diff --git a/build.gradle.kts b/build.gradle.kts index 11eb3834a..d929a4ebf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,9 +12,9 @@ import kotlin.reflect.full.starProjectedType plugins { id("application") - id("com.diffplug.spotless") version "6.20.0" - id("com.github.ben-manes.versions") version "0.47.0" - id("com.github.spotbugs") version "5.0.14" + id("com.diffplug.spotless") version "6.25.0" + id("com.github.ben-manes.versions") version "0.51.0" + id("com.github.spotbugs") version "6.0.12" id("net.ltgt.errorprone") version "3.1.0" id("org.openstreetmap.josm") version "0.8.2" id("org.sonarqube") version "4.3.0.3225" @@ -56,21 +56,17 @@ java.sourceCompatibility = JavaVersion.VERSION_17 java.targetCompatibility = JavaVersion.VERSION_17 val versions = mapOf( - "awaitility" to "4.2.0", - // Errorprone 2.11 requires Java 11+ - "errorprone" to if (JavaVersion.current() >= JavaVersion.VERSION_11) "2.20.0" else "2.10.0", + "awaitility" to "4.2.1", + "errorprone" to "2.26.1", "jdatepicker" to "1.3.4", "jmockit" to "1.49", - "junit" to "5.9.3", + "junit" to "5.10.2", "pmd" to "6.42.0", - "spotbugs" to "4.7.3", - "wiremock" to "2.35.0" + "spotbugs" to "4.8.4", + "wiremock" to "2.35.1" ) dependencies { - if (!JavaVersion.current().isJava9Compatible) { - errorproneJavac("com.google.errorprone:javac:9+181-r4173-1") - } errorprone("com.google.errorprone:error_prone_core:${versions["errorprone"]}") testImplementation ("org.openstreetmap.josm:josm-unittest:SNAPSHOT"){ isChanging = true } testImplementation("com.github.tomakehurst:wiremock-jre8:${versions["wiremock"]}") @@ -255,23 +251,21 @@ project.afterEvaluate { // Spotbugs config spotbugs { - toolVersion.set("4.0.6") ignoreFailures.set(true) effort.set(Effort.MAX) reportLevel.set(Confidence.LOW) - reportsDir.set(File(buildDir, "reports/spotbugs")) + reportsDir = file("$buildDir/reports/spotbugs") } tasks.withType(SpotBugsTask::class) { reports.create("html") { - outputLocation.set(File(spotbugs.reportsDir.get().asFile, "$baseName.html")) - setStylesheet("color.xsl") + setStylesheet("fancy-hist.xsl") } } // JaCoCo config jacoco { - toolVersion = "0.8.10" + toolVersion = "0.8.12" } tasks.jacocoTestReport { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 249e5832f..033e24c4c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bc6eae943..381baa9ce 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,8 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +distributionSha256Sum=544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index a69d9cb6c..fcb6fca14 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +130,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +197,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/gradlew.bat b/gradlew.bat index f127cfd49..93e3f59f1 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME%