diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4be6d7c..cf41208 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' - name: Build with Gradle uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee diff --git a/build.gradle b/build.gradle index 53b3d2f..93a3b30 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { - id "com.github.mxenabled.coppuccino" version "5.+" - id "com.github.mxenabled.vogue" version "2.+" + id "com.github.mxenabled.coppuccino" version "6.+" + id "com.github.mxenabled.vogue" version "3.+" id "groovy" id "java" id "maven-publish" @@ -12,8 +12,12 @@ plugins { group "com.mx.binks" version "2.0.0" -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} repositories { mavenCentral() @@ -27,7 +31,7 @@ dependencies { implementation "com.lordcodes.turtle:turtle:0.7.0" // Provides git and commandline interaction API // Unit tests - testImplementation "org.mockito:mockito-inline:[5.0,6.0)" + testImplementation "org.mockito:mockito-core:5.21.0" testImplementation "org.spockframework:spock-core:2.4-M6-groovy-3.0" } @@ -46,19 +50,19 @@ gradlePlugin { kotlin { compilerOptions { - jvmTarget = JvmTarget.JVM_17 + jvmTarget = JvmTarget.JVM_21 } } coppuccino { kotlin { - enabled = true + required = true } } test { useJUnitPlatform() } wrapper { - gradleVersion = "7.6.4" + gradleVersion = "8.14.3" distributionType = Wrapper.DistributionType.ALL } diff --git a/gradle.lockfile b/gradle.lockfile index 69ecc73..67a4c42 100644 --- a/gradle.lockfile +++ b/gradle.lockfile @@ -40,22 +40,22 @@ io.gitlab.arturbosch.detekt:detekt-tooling:1.23.8=detekt io.gitlab.arturbosch.detekt:detekt-utils:1.23.8=detekt io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath jaxen:jaxen:2.0.0=spotbugs -net.bytebuddy:byte-buddy-agent:1.14.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -net.bytebuddy:byte-buddy:1.14.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +net.bytebuddy:byte-buddy-agent:1.17.7=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +net.bytebuddy:byte-buddy:1.17.7=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath net.sf.saxon:Saxon-HE:12.9=spotbugs org.apache.bcel:bcel:6.11.0=spotbugs org.apache.commons:commons-lang3:3.19.0=spotbugs org.apache.commons:commons-text:1.14.0=spotbugs org.apache.logging.log4j:log4j-api:2.25.2=spotbugs org.apache.logging.log4j:log4j-core:2.25.2=spotbugs -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata +org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata org.codehaus.groovy:groovy:3.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.dom4j:dom4j:2.2.0=spotbugs org.hamcrest:hamcrest:3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.jacoco:org.jacoco.agent:0.8.8=jacocoAgent,jacocoAnt -org.jacoco:org.jacoco.ant:0.8.8=jacocoAnt -org.jacoco:org.jacoco.core:0.8.8=jacocoAnt -org.jacoco:org.jacoco.report:0.8.8=jacocoAnt +org.jacoco:org.jacoco.agent:0.8.13=jacocoAgent,jacocoAnt +org.jacoco:org.jacoco.ant:0.8.13=jacocoAnt +org.jacoco:org.jacoco.core:0.8.13=jacocoAnt +org.jacoco:org.jacoco.report:0.8.13=jacocoAnt org.jcommander:jcommander:1.85=detekt org.jetbrains.intellij.deps:trove4j:1.0.20200330=detekt,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath org.jetbrains.kotlin:kotlin-build-common:2.1.0=kotlinBuildToolsApiClasspath @@ -90,28 +90,20 @@ org.jetbrains.kotlinx:kotlinx-serialization-core:1.4.1=detekt org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.4.1=detekt org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1=detekt org.jetbrains:annotations:13.0=compileClasspath,detekt,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-api:5.8.2=testRuntimeOnlyDependenciesMetadata -org.junit.jupiter:junit-jupiter-engine:5.8.2=testRuntimeOnlyDependenciesMetadata org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.platform:junit-platform-commons:1.8.2=testRuntimeOnlyDependenciesMetadata org.junit.platform:junit-platform-engine:1.12.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.platform:junit-platform-engine:1.8.2=testRuntimeOnlyDependenciesMetadata org.junit:junit-bom:5.12.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.junit:junit-bom:5.14.0=spotbugs -org.junit:junit-bom:5.8.2=testRuntimeOnlyDependenciesMetadata -org.mockito:mockito-core:5.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.mockito:mockito-inline:5.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.mockito:mockito-core:5.21.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.objenesis:objenesis:3.3=testRuntimeClasspath -org.opentest4j:opentest4j:1.2.0=testRuntimeOnlyDependenciesMetadata org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.2=jacocoAnt org.ow2.asm:asm-analysis:9.9=spotbugs -org.ow2.asm:asm-commons:9.2=jacocoAnt +org.ow2.asm:asm-commons:9.8=jacocoAnt org.ow2.asm:asm-commons:9.9=spotbugs -org.ow2.asm:asm-tree:9.2=jacocoAnt +org.ow2.asm:asm-tree:9.8=jacocoAnt org.ow2.asm:asm-tree:9.9=spotbugs org.ow2.asm:asm-util:9.9=spotbugs -org.ow2.asm:asm:9.2=jacocoAnt +org.ow2.asm:asm:9.8=jacocoAnt org.ow2.asm:asm:9.9=spotbugs org.slf4j:slf4j-api:2.0.17=spotbugs,spotbugsSlf4j org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j @@ -119,4 +111,4 @@ org.snakeyaml:snakeyaml-engine:2.7=detekt org.spockframework:spock-bom:2.4-M6-groovy-3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.spockframework:spock-core:2.4-M6-groovy-3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.xmlresolver:xmlresolver:5.3.3=spotbugs -empty=annotationProcessor,apiDependenciesMetadata,detektPlugins,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtimeOnlyDependenciesMetadata,spotbugsPlugins,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions +empty=annotationProcessor,apiDependenciesMetadata,detektPlugins,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,spotbugsPlugins,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index afba109..1b33c55 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 5c00f61..7705927 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..23d15a9 100755 --- a/gradlew +++ b/gradlew @@ -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/HEAD/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,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -133,10 +133,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 +147,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 +155,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 @@ -197,16 +200,20 @@ 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..5eed7ee 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 ########################################################################## @@ -43,11 +45,11 @@ 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 @@ -57,22 +59,22 @@ 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 :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell