diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 62a69d079..22a692aae 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -20,11 +20,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 - name: Verify Changed files in docs - uses: tj-actions/verify-changed-files@v8.1 + uses: tj-actions/verify-changed-files@v13.1 id: verify-changed-files with: files: | @@ -50,10 +50,10 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} with: limit-access-to-actor: true - - uses: actions/checkout@v3 - - uses: gradle/wrapper-validation-action@v1 + - uses: actions/checkout@v4 + - uses: gradle/wrapper-validation-action@v2 - name: install-java8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 11 distribution: temurin @@ -80,13 +80,13 @@ jobs: run: | ./gradlew --no-daemon jacocoTestReport - name: Upload Test Report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() # always run even if the previous step fails with: name: junit-test-results path: '**/build/test-results/test/TEST-*.xml' retention-days: 1 - - uses: codecov/codecov-action@v2 + - uses: codecov/codecov-action@v4 with: #files: ./coverage1.xml,./coverage2.xml # optional flags: ${{ runner.os }} # optional @@ -94,7 +94,7 @@ jobs: verbose: true # optional (default = false) - name: build-choco-package if: runner.os == 'Windows' - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: '2.2.204' # SDK Version to use. - name: build-choco @@ -103,13 +103,13 @@ jobs: powershell choco pack build/choco/jbang.nuspec - name: Archive build results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: ${{ runner.os }}-build-${{ github.sha }} path: build - name: Upload jbang.zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && runner.os != 'Windows' with: name: jbang-${{ github.sha }} @@ -125,11 +125,11 @@ jobs: java: [8,11,17,19] runs-on: ${{ matrix.os }} steps: - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: ${{ runner.os }}-build-${{ github.sha }} path: build diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c52526c35..b84c579ab 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,11 +38,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -53,7 +53,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -67,4 +67,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/install-tests.yml b/.github/workflows/install-tests.yml index 6849c9a3a..562d03e28 100644 --- a/.github/workflows/install-tests.yml +++ b/.github/workflows/install-tests.yml @@ -6,7 +6,7 @@ jobs: macos: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Remove Java run: | sudo rm -rf /Library/Java/* diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 8ccff7ded..426557c9f 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -23,11 +23,11 @@ jobs: JRELEASER_NEXUS2_PASSWORD: ${{ secrets.OSSRH_TOKEN }} JRELEASER_VERSION: 1.9.0 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: install-java11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 11 distribution: temurin @@ -50,7 +50,7 @@ jobs: setup-java: false - name: JReleaser publish output if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jreleaser-publish path: | @@ -73,14 +73,14 @@ jobs: setup-java: false - name: JReleaser announce output if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jreleaser-announce path: | out/jreleaser/trace.log out/jreleaser/output.properties - name: upload-choco - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: build-choco path: build/choco @@ -90,11 +90,11 @@ jobs: name: publish-choco continue-on-error: true steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: build-choco path: build/choco - - uses: actions/setup-dotnet@v1 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '2.2.204' # SDK Version to use. - name: choco-build diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 80667d7bb..bfda7fac0 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -22,7 +22,7 @@ jobs: workflow: ${{ github.event.workflow.id }} run_id: ${{ github.event.workflow_run.id }} - name: Publish Test Report - uses: mikepenz/action-junit-report@v3 + uses: mikepenz/action-junit-report@v4 with: commit: ${{github.event.workflow_run.head_sha}} report_paths: '**/build/test-results/test/TEST-*.xml' \ No newline at end of file diff --git a/.github/workflows/tag-and-release.yml b/.github/workflows/tag-and-release.yml index 21a0a9dff..4bf29234e 100644 --- a/.github/workflows/tag-and-release.yml +++ b/.github/workflows/tag-and-release.yml @@ -23,11 +23,11 @@ jobs: JRELEASER_NEXUS2_PASSWORD: ${{ secrets.OSSRH_TOKEN }} JRELEASER_VERSION: 1.5.1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: install-java11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 11 distribution: temurin @@ -57,7 +57,7 @@ jobs: setup-java: false - name: JReleaser output if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jreleaser-release path: | diff --git a/build.gradle b/build.gradle index fb5929fbf..e027ceaf6 100644 --- a/build.gradle +++ b/build.gradle @@ -2,18 +2,18 @@ import org.gradle.crypto.checksum.Checksum plugins { id "distribution" - id "com.github.johnrengelman.shadow" version "8.0.0" + id "com.github.johnrengelman.shadow" version "8.1.1" id "java" - id "com.github.breadmoirai.github-release" version "2.4.1" - id "io.toolebox.git-versioner" version "1.6.5" + id "com.github.breadmoirai.github-release" version "2.5.2" + id "io.toolebox.git-versioner" version "1.6.7" id 'org.gradle.crypto.checksum' version '1.4.0' - id "com.diffplug.spotless" version "6.13.0" // can't go higher to still work with Java 8 - id 'com.github.gmazzo.buildconfig' version "3.1.0" + id "com.diffplug.spotless" version "6.25.0" // can't go higher to still work with Java 8 + id 'com.github.gmazzo.buildconfig' version "5.3.5" id "com.dorongold.task-tree" version "2.1.1" id "com.geoffgranum.gradle-conventional-changelog" version "0.3.1" - id "org.asciidoctor.jvm.convert" version "3.3.2" - id "org.ajoberstar.grgit" version "4.1.1" - id "org.sonarqube" version "4.0.0.2929" + id "org.asciidoctor.jvm.convert" version "4.0.2" + id "org.ajoberstar.grgit" version "5.2.2" + id "org.sonarqube" version "4.4.1.3373" id 'jacoco' id 'maven-publish' } @@ -90,27 +90,27 @@ dependencies { implementation 'com.offbytwo:docopt:0.6.0.20150202' implementation 'org.apache.commons:commons-text:1.11.0' - implementation 'org.apache.commons:commons-compress:1.25.0' - implementation 'info.picocli:picocli:4.6.3' - implementation 'io.quarkus.qute:qute-core:1.12.2.Final' + implementation 'org.apache.commons:commons-compress:1.26.1' + implementation 'info.picocli:picocli:4.7.5' + implementation 'io.quarkus.qute:qute-core:3.8.2' implementation 'kr.motd.maven:os-maven-plugin:1.7.1' implementation 'org.codehaus.plexus:plexus-java:1.2.0' implementation 'com.google.code.gson:gson:2.10.1' - implementation 'org.jsoup:jsoup:1.17.1' + implementation 'org.jsoup:jsoup:1.17.2' implementation 'org.codejive:java-properties:0.0.7' - implementation "org.slf4j:slf4j-nop:1.7.30" - implementation "org.slf4j:jcl-over-slf4j:1.7.30" - implementation "org.jboss:jandex:2.2.3.Final" + implementation "org.slf4j:slf4j-nop:2.0.12" + implementation "org.slf4j:jcl-over-slf4j:2.0.12" + implementation "org.jboss:jandex:3.1.6" - implementation "eu.maveniverse.maven.mima:context:2.4.4" - runtimeOnly "eu.maveniverse.maven.mima.runtime:standalone-static:2.4.4" + implementation "eu.maveniverse.maven.mima:context:2.4.8" + runtimeOnly "eu.maveniverse.maven.mima.runtime:standalone-static:2.4.8" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.1" - testImplementation "org.junit.jupiter:junit-jupiter:5.10.1" - testImplementation "com.github.stefanbirkner:system-rules:1.17.2" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.2" + testImplementation "org.junit.jupiter:junit-jupiter:5.10.2" + testImplementation "com.github.stefanbirkner:system-rules:1.19.0" testImplementation "org.hamcrest:hamcrest-library:2.2" - testImplementation "com.github.tomakehurst:wiremock-jre8:2.32.0" + testImplementation "com.github.tomakehurst:wiremock-jre8:3.0.1" //testImplementation 'com.github.maxandersen.karate:karate-junit:19e06766' //testImplementation 'com.github.maxandersen.karate:karate-apache:19e06766' @@ -257,7 +257,7 @@ test { } jacoco { - toolVersion = '0.8.7' + toolVersion = '0.8.11' } jacocoTestReport { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2..d64cd4917 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 f72df95a7..a80b22ce5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c78733..1aa94a426 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,11 @@ 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"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,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=SC2039,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=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ 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, 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" \ @@ -205,6 +214,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32c..25da30dbd 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +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 @@ -56,11 +57,11 @@ 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 @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +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! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +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 diff --git a/settings.gradle b/settings.gradle index b3b191865..1ac43965b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,6 @@ pluginManagement { plugins { - id "com.gradle.enterprise" version "3.7.2" + id "com.gradle.enterprise" version "3.16.2" } }