diff --git a/build.gradle b/build.gradle index 966e2b3..35dea89 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ plugins { - id "com.github.mxenabled.vogue" version "3.+" + id "com.github.mxenabled.vogue" version "4.+" id "groovy" id "java-gradle-plugin" id "maven-publish" - id "com.github.ben-manes.versions" version "0.53.0" + id "com.github.ben-manes.versions" version "0.54.0" } -group "com.mx.coppuccino" -version "7.0.1" // x-release-please-version +group = "com.mx.coppuccino" +version = "7.0.1" // x-release-please-version java { toolchain { @@ -19,14 +19,13 @@ repositories { mavenCentral() mavenLocal() gradlePluginPortal() - maven { url "https://jitpack.io" } + maven { url = "https://jitpack.io" } } dependencies { implementation "ru.vyarus:gradle-quality-plugin:[6.0,7.0)" implementation "com.github.spotbugs:com.github.spotbugs.gradle.plugin:[6.4,7.0)" - // spotless-plugin-gradle 8.1.+ requires gradle 8+ - implementation "com.diffplug.spotless:spotless-plugin-gradle:7.0.2" + implementation "com.diffplug.spotless:spotless-plugin-gradle:[8.6,9.0)" implementation "org.kordamp.gradle:jacoco-gradle-plugin:0.54.0" implementation "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.8" } @@ -47,6 +46,6 @@ gradlePlugin { } wrapper { - gradleVersion = "8.14.3" + gradleVersion = "9.5.1" distributionType = Wrapper.DistributionType.ALL } diff --git a/gradle.lockfile b/gradle.lockfile index 5d47f59..8d44a69 100644 --- a/gradle.lockfile +++ b/gradle.lockfile @@ -5,18 +5,18 @@ com.diffplug.durian:durian-collect:1.2.0=runtimeClasspath,testRuntimeClasspath com.diffplug.durian:durian-core:1.2.0=runtimeClasspath,testRuntimeClasspath com.diffplug.durian:durian-io:1.2.0=runtimeClasspath,testRuntimeClasspath com.diffplug.durian:durian-swt.os:4.3.0=runtimeClasspath,testRuntimeClasspath -com.diffplug.spotless:spotless-lib-extra:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.diffplug.spotless:spotless-lib:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.diffplug.spotless:spotless-plugin-gradle:7.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.github.spotbugs.snom:spotbugs-gradle-plugin:6.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.github.spotbugs:com.github.spotbugs.gradle.plugin:6.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.diffplug.spotless:spotless-lib-extra:4.7.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.diffplug.spotless:spotless-lib:4.7.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.diffplug.spotless:spotless-plugin-gradle:8.7.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.github.spotbugs.snom:spotbugs-gradle-plugin:6.5.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.github.spotbugs:com.github.spotbugs.gradle.plugin:6.5.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.googlecode.concurrent-trees:concurrent-trees:2.6.1=runtimeClasspath,testRuntimeClasspath com.googlecode.javaewah:JavaEWAH:1.2.3=runtimeClasspath,testRuntimeClasspath com.squareup.okhttp3:okhttp:4.12.0=runtimeClasspath,testRuntimeClasspath com.squareup.okio:okio-jvm:3.6.0=runtimeClasspath,testRuntimeClasspath com.squareup.okio:okio:3.6.0=runtimeClasspath,testRuntimeClasspath -commons-codec:commons-codec:1.17.0=runtimeClasspath,testRuntimeClasspath -dev.equo.ide:solstice:1.8.1=runtimeClasspath,testRuntimeClasspath +commons-codec:commons-codec:1.22.0=runtimeClasspath,testRuntimeClasspath +dev.equo.ide:solstice:1.8.2=runtimeClasspath,testRuntimeClasspath io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.8=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.inject:javax.inject:1=runtimeClasspath,testRuntimeClasspath org.apache.commons:commons-lang3:3.8.1=runtimeClasspath,testRuntimeClasspath @@ -26,8 +26,8 @@ org.apache.maven:maven-model-builder:3.8.8=runtimeClasspath,testRuntimeClasspath org.apache.maven:maven-model:3.8.8=runtimeClasspath,testRuntimeClasspath org.codehaus.plexus:plexus-interpolation:1.26=runtimeClasspath,testRuntimeClasspath org.codehaus.plexus:plexus-utils:3.3.1=runtimeClasspath,testRuntimeClasspath -org.eclipse.jgit:org.eclipse.jgit:6.10.0.202406032230-r=runtimeClasspath,testRuntimeClasspath -org.eclipse.platform:org.eclipse.osgi:3.18.500=runtimeClasspath,testRuntimeClasspath +org.eclipse.jgit:org.eclipse.jgit:7.7.0.202606012155-r=runtimeClasspath,testRuntimeClasspath +org.eclipse.platform:org.eclipse.osgi:3.24.200=runtimeClasspath,testRuntimeClasspath org.eclipse.sisu:org.eclipse.sisu.inject:0.3.5=runtimeClasspath,testRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=runtimeClasspath,testRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10=runtimeClasspath,testRuntimeClasspath @@ -37,7 +37,7 @@ org.jetbrains:annotations:13.0=compileClasspath,runtimeClasspath,testCompileClas org.kordamp.gradle.base:org.kordamp.gradle.base.gradle.plugin:0.54.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.kordamp.gradle:base-gradle-plugin:0.54.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.kordamp.gradle:jacoco-gradle-plugin:0.54.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.slf4j:slf4j-api:1.7.36=runtimeClasspath,testRuntimeClasspath +org.slf4j:slf4j-api:2.0.18=runtimeClasspath,testRuntimeClasspath org.tukaani:xz:1.9=runtimeClasspath,testRuntimeClasspath ru.vyarus:gradle-quality-plugin:6.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor,testAnnotationProcessor diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index afba109..b1b8ef5 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 37a6725..e74c870 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,9 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-all.zip networkTimeout=10000 +retries=0 +retryBackOffMs=500 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..b9bb139 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -83,10 +85,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# 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"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -133,10 +132,13 @@ 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. @@ -144,7 +146,7 @@ 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 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +154,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -169,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -197,16 +198,19 @@ if "$cygwin" || "$msys" ; then done fi -# 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 -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# 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 optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 6689b85..aa5f10b 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -21,8 +23,8 @@ @rem @rem ########################################################################## -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. @@ -43,13 +45,13 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -57,36 +59,24 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/settings.gradle b/settings.gradle index 1c3d04a..ecd19a9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,7 +3,7 @@ pluginManagement { gradlePluginPortal() mavenCentral() mavenLocal() - maven { url "https://jitpack.io" } + maven { url = "https://jitpack.io" } } } diff --git a/src/main/groovy/com/mx/coppuccino/CoppuccinoPlugin.groovy b/src/main/groovy/com/mx/coppuccino/CoppuccinoPlugin.groovy index efb85be..4a59ed2 100644 --- a/src/main/groovy/com/mx/coppuccino/CoppuccinoPlugin.groovy +++ b/src/main/groovy/com/mx/coppuccino/CoppuccinoPlugin.groovy @@ -69,7 +69,7 @@ class CoppuccinoPlugin implements Plugin { // Quality plugin configuration // ************************************** quality { - checkstyleVersion = '10.25.0' + checkstyleVersion = '13.6.0' checkstyle = javaEx.enabled codenarc = false pmd = true diff --git a/src/main/groovy/com/mx/coppuccino/SetupCoppuccino.groovy b/src/main/groovy/com/mx/coppuccino/SetupCoppuccino.groovy index e447771..0d49ac8 100644 --- a/src/main/groovy/com/mx/coppuccino/SetupCoppuccino.groovy +++ b/src/main/groovy/com/mx/coppuccino/SetupCoppuccino.groovy @@ -19,10 +19,12 @@ import groovy.transform.CompileStatic import org.gradle.api.DefaultTask import org.gradle.api.tasks.Input import org.gradle.api.tasks.TaskAction +import org.gradle.work.DisableCachingByDefault import java.nio.file.Paths @CompileStatic +@DisableCachingByDefault class SetupCoppuccino extends DefaultTask { SetupCoppuccino() { diff --git a/src/main/groovy/com/mx/coppuccino/SpotbugsConsoleReporter.groovy b/src/main/groovy/com/mx/coppuccino/SpotbugsConsoleReporter.groovy index a3e9a32..b212734 100644 --- a/src/main/groovy/com/mx/coppuccino/SpotbugsConsoleReporter.groovy +++ b/src/main/groovy/com/mx/coppuccino/SpotbugsConsoleReporter.groovy @@ -2,6 +2,7 @@ package com.mx.coppuccino import groovy.transform.CompileStatic import groovy.transform.TypeCheckingMode +import groovy.xml.XmlParser import org.gradle.api.Project import org.gradle.internal.logging.text.StyledTextOutput.Style import org.gradle.internal.logging.text.StyledTextOutputFactory @@ -17,7 +18,7 @@ class SpotbugsConsoleReporter { } static String unescapeHtml(String html) { - new XmlSlurper().parseText("${html.trim().replaceAll('\\ ', '')}") + new XmlParser().parseText("${html.trim().replaceAll('\\ ', '')}") } String NL = String.format('%n')