From bef4757518a0077481a4a10179afd83aa9739848 Mon Sep 17 00:00:00 2001 From: soloturn Date: Sun, 8 Oct 2023 00:56:25 +0200 Subject: [PATCH] gradle-8.4, fix pmd warnings gradle-8.4 fully supports java-21, update link in comment because of new gradle version. codemetrics-2.1.0, has the pmd rules inlined, so warnings are gone now. see MovingBlocks/TeraConfig#19 and MovingBlocks/TeraConfig#22. update pmd to 6.55.0, last release before 7.0.0. update spotbugs gradle plugin to 5.2.0 to makeit work with java-21. --- build-logic/build.gradle.kts | 2 +- build-logic/src/main/kotlin/terasology-metrics.gradle.kts | 6 +++--- build.gradle | 2 +- engine/build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 89af65d3e1c..af1854223f7 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -46,7 +46,7 @@ dependencies { implementation("org.terasology.gestalt:gestalt-module:7.1.0") // plugins we configure - implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.1.3") + implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.2.0") implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3") api(kotlin("test")) diff --git a/build-logic/src/main/kotlin/terasology-metrics.gradle.kts b/build-logic/src/main/kotlin/terasology-metrics.gradle.kts index e80c14ad19a..123664364e4 100644 --- a/build-logic/src/main/kotlin/terasology-metrics.gradle.kts +++ b/build-logic/src/main/kotlin/terasology-metrics.gradle.kts @@ -14,8 +14,8 @@ plugins { } dependencies { - "pmd"("net.sourceforge.pmd:pmd-core:6.15.0") - "pmd"("net.sourceforge.pmd:pmd-java:6.15.0") + pmd("net.sourceforge.pmd:pmd-core:6.55.0") + pmd("net.sourceforge.pmd:pmd-java:6.55.0") testRuntimeOnly("ch.qos.logback:logback-classic:1.2.11") { because("runtime: to configure logging during tests with logback.xml") @@ -27,7 +27,7 @@ dependencies { because("redirects java.util.logging (from e.g. junit) through slf4j") } - add("testImplementation", platform("org.junit:junit-bom:5.8.1")) + add("testImplementation", platform("org.junit:junit-bom:5.10.0")) testImplementation("org.junit.jupiter:junit-jupiter-api") testImplementation("org.junit.jupiter:junit-jupiter-params") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") diff --git a/build.gradle b/build.gradle index a32fc232606..dff4da47618 100644 --- a/build.gradle +++ b/build.gradle @@ -104,7 +104,7 @@ dependencies { // Config for our code analytics lives in a centralized repo: https://github.com/MovingBlocks/TeraConfig - codeMetrics group: 'org.terasology.config', name: 'codemetrics', version: '1.6.3', ext: 'zip' + codeMetrics group: 'org.terasology.config', name: 'codemetrics', version: '2.1.0', ext: 'zip' // Natives for JNLua (Kallisti, KComputers) natives group: 'org.terasology.jnlua', name: 'jnlua_natives', version: '0.1.0-SNAPSHOT', ext: 'zip' diff --git a/engine/build.gradle b/engine/build.gradle index e10ec9d3b40..562ae47c417 100644 --- a/engine/build.gradle +++ b/engine/build.gradle @@ -247,7 +247,7 @@ def createVersionInfoFile = tasks.register("createVersionInfoFile", WritePropert // It is a value we can always get (on Jenkins or otherwise) but we don't want local builds // to invalidate their cache whenever the time changes. // TODO: after upgrading to Gradle 6.8, see if we can have it ignore this property specifically: - // https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:property_file_normalization + // https://docs.gradle.org/current/userguide/incremental_build.html#sec:property_file_normalization property("dateTime", startDateTimeString) } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d11cdd907dd..8838ba97ba0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME