From 47de776e36ed5357be038adddceeb7606ea1c2dd Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Thu, 7 Oct 2021 10:36:38 +0300 Subject: [PATCH 1/3] gradle: upgrade --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 14e30f7..a0f7639 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 6e8a16e36fd21daf4548f9fd7aa42cae23773b52 Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Thu, 7 Oct 2021 11:35:49 +0300 Subject: [PATCH 2/3] gradle: script update --- .gitattributes | 2 +- .gitignore | 1 - build.gradle | 88 ++++++++++++++++------------------------------- gradle.properties | 3 -- settings.gradle | 2 +- 5 files changed, 32 insertions(+), 64 deletions(-) delete mode 100644 gradle.properties diff --git a/.gitattributes b/.gitattributes index 72216f8..0f3666f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,4 +4,4 @@ gradlew.bat text eol=crlf gradle/wrapper/gradle-wrapper.properties text eol=lf # Other -.gitattributes text eol=lf \ No newline at end of file +.gitattributes text eol=lf diff --git a/.gitignore b/.gitignore index 90ae4d1..6132566 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,3 @@ out/ # GRADLE # .gradle/ build/ -publish.gradle diff --git a/build.gradle b/build.gradle index bc0e549..bcc696b 100644 --- a/build.gradle +++ b/build.gradle @@ -2,13 +2,14 @@ plugins { id 'java' } -def publishScript = file(rootProject.getProjectDir().getPath() + '/publish.gradle') -if (publishScript.exists()) { - apply from: publishScript.path -} +project.group = 'ghast' +project.version = '1.12.2-SNAPSHOT' +jar.archiveBaseName.set(project.name) -project.group = projectGroup -project.version = projectVersion +compileJava { + sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 + options.encoding = 'UTF-8' +} repositories { mavenLocal() @@ -17,63 +18,34 @@ repositories { maven { url 'https://dmx-mc-project.gitlab.io/maven-repository/' } } -ext { - junitVersion = '5.5.2' - - libs = [ - bukkit: [lib: 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT', exclude: [ - 'com.google.code.gson:gson', - 'com.googlecode.json-simple:json-simple', - 'commons-lang:commons-lang', - 'org.yaml:snakeyaml' - ]], - commons_text: 'org.apache.commons:commons-text:1.9', - lombok: 'org.projectlombok:lombok:1.18.12', - reflection_object: 'ru.dmitriymx:reflection-object:1.2', - test: [ - junit5: [ - "org.junit.jupiter:junit-jupiter-api:$junitVersion", - "org.junit.jupiter:junit-jupiter-engine:$junitVersion" - ], - mock: ['org.mockito:mockito-core:1.10.19'], - h2db: 'com.h2database:h2:1.4.200' - ] - - ] -} - -def compileOnly2(library) { - dependencies.compileOnly library.lib, { - library.exclude.each { String excludeLibStr -> - String[] excludeLib = excludeLibStr.split(':') - exclude group: excludeLib[0], module: excludeLib[1] - } - } -} - -def testImplementation2(library) { - dependencies.testImplementation library.lib, { - library.exclude.each { String excludeLibStr -> - String[] excludeLib = excludeLibStr.split(':') - exclude group: excludeLib[0], module: excludeLib[1] - } - } -} +def lombokVersion = '1.18.12' +def junitVersion = '5.5.2' dependencies { - compileOnly libs.lombok - annotationProcessor libs.lombok + annotationProcessor("org.projectlombok:lombok:$lombokVersion") + compileOnly("org.projectlombok:lombok:$lombokVersion") - compileOnly2 libs.bukkit - implementation libs.commons_text - implementation libs.reflection_object + compileOnly('org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT') { + exclude(module: 'gson') + exclude(module: 'json-simple') + exclude(module: 'commons-lang') + exclude(module: 'snakeyaml') + } + implementation('org.apache.commons:commons-text:1.9') + implementation('ru.dmitriymx:reflection-object:1.2') - testImplementation libs.test.junit5 - testImplementation libs.test.mock - testImplementation2 libs.bukkit - testImplementation libs.test.h2db + testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion") + testImplementation("org.junit.jupiter:junit-jupiter-engine:$junitVersion") + testImplementation('org.mockito:mockito-core:1.10.19') + testImplementation('org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT') { + exclude(module: 'gson') + exclude(module: 'json-simple') + exclude(module: 'commons-lang') + exclude(module: 'snakeyaml') + } + testImplementation('com.h2database:h2:1.4.200') } test { useJUnitPlatform() -} \ No newline at end of file +} diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index 645012a..0000000 --- a/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -projectGroup=ghast -projectName=ghast-tools -projectVersion=1.12.1 \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index de4b82c..8159b24 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -rootProject.name=projectName \ No newline at end of file +rootProject.name = 'ghast-tools' From d3bae13c351aabb2a106d4ee3be1e824851da33e Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Thu, 7 Oct 2021 11:37:52 +0300 Subject: [PATCH 3/3] gradle: upgrade dependencies --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index bcc696b..f0a23cb 100644 --- a/build.gradle +++ b/build.gradle @@ -18,8 +18,8 @@ repositories { maven { url 'https://dmx-mc-project.gitlab.io/maven-repository/' } } -def lombokVersion = '1.18.12' -def junitVersion = '5.5.2' +def lombokVersion = '1.18.20' +def junitVersion = '5.8.1' dependencies { annotationProcessor("org.projectlombok:lombok:$lombokVersion") @@ -36,7 +36,7 @@ dependencies { testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion") testImplementation("org.junit.jupiter:junit-jupiter-engine:$junitVersion") - testImplementation('org.mockito:mockito-core:1.10.19') + testImplementation('org.mockito:mockito-core:3.12.4') testImplementation('org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT') { exclude(module: 'gson') exclude(module: 'json-simple')