diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 958ff1c..17297e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [11, 21, 22] + java: [17, 21, 22] steps: - uses: actions/checkout@v4 diff --git a/build.gradle.kts b/build.gradle.kts index 6150f8e..c098cc1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,9 +18,15 @@ subprojects { extra["versionBC"] = "1.16.0" java { - val javaVersion = JavaVersion.VERSION_11 - sourceCompatibility = javaVersion - targetCompatibility = javaVersion + if (System.getenv("RELEASE") != null) { + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) + } + } else { + val javaVersion = JavaVersion.VERSION_11 + sourceCompatibility = javaVersion + targetCompatibility = javaVersion + } } spotless { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e644113..9bbc975 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 515ab9d..2a6e21b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip +distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index b740cf1..faf9300 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 +# ############################################################################## # @@ -84,7 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # 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 +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 @@ -203,7 +205,7 @@ fi 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, +# * 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. diff --git a/gradlew.bat b/gradlew.bat index 25da30d..9d21a21 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 ########################################################################## diff --git a/settings.gradle.kts b/settings.gradle.kts index 04a67ad..c99cc74 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("org.zaproxy.common.settings") version "0.3.0" + id("org.zaproxy.common.settings") version "0.5.0" id("com.diffplug.spotless") version "6.25.0" apply false } diff --git a/subprojects/zap-clientapi/zap-clientapi.gradle b/subprojects/zap-clientapi/zap-clientapi.gradle index 9d53915..cd11716 100644 --- a/subprojects/zap-clientapi/zap-clientapi.gradle +++ b/subprojects/zap-clientapi/zap-clientapi.gradle @@ -38,8 +38,8 @@ File clientapiJar(version) { } task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask) { - group 'verification' - description "Checks artifacts' binary compatibility with latest (released) version '$versionBC'." + group = 'verification' + description = "Checks artifacts' binary compatibility with latest (released) version '$versionBC'." oldClasspath.from(files(clientapiJar(versionBC))) newClasspath.from(tasks.named(JavaPlugin.JAR_TASK_NAME)) @@ -67,8 +67,8 @@ task sourcesJar(type: Jar) { } task uberJar(type: Jar) { - group 'build' - description 'Assembles a jar archive containing the main jar and its dependencies.' + group = 'build' + description = 'Assembles a jar archive containing the main jar and its dependencies.' archiveBaseName.set('zap-api') manifest.from jar.manifest from { @@ -88,7 +88,7 @@ publishing { maven { def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" - url version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl + url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) { credentials {