Skip to content

Commit ef073f2

Browse files
authored
Merge pull request #453 from thc202/gradle/update-8.8
Update Gradle and ZAP, add Java 22 to CI
2 parents f270fe0 + 6fe5e4b commit ef073f2

File tree

9 files changed

+29
-23
lines changed

9 files changed

+29
-23
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
java: [11]
14+
java: [11, 22]
1515

1616
steps:
1717
- uses: actions/checkout@v4
1818
- uses: actions/setup-java@v4
1919
with:
2020
distribution: 'temurin'
2121
java-version: ${{ matrix.java }}
22-
- uses: gradle/wrapper-validation-action@v2
22+
- uses: gradle/actions/wrapper-validation@v3
2323
- uses: gradle/actions/setup-gradle@v3
2424
- run: ./gradlew assemble
2525
- run: ./gradlew check

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1414
- authentication/KratosBrowserAuthentication.js - A script to authenticate with Kratos using the browser flow
1515

1616
### Changed
17+
- Update minimum ZAP version to 2.15.0.
1718
- Use Prettier to format all JavaScript scripts.
1819
- Update the following scripts to implement the `getMetadata()` function with revised metadata:
1920
- active/Cross Site WebSocket Hijacking.js

build.gradle.kts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import org.zaproxy.gradle.addon.misc.ConvertMarkdownToHtml
88

99
plugins {
1010
`java-library`
11-
id("org.zaproxy.add-on") version "0.10.0"
11+
id("org.zaproxy.add-on") version "0.11.0"
1212
id("org.zaproxy.crowdin") version "0.4.0"
1313
id("com.diffplug.spotless")
1414
id("com.github.node-gradle.node") version "7.0.2"
@@ -22,7 +22,7 @@ val scriptsDir = layout.buildDirectory.dir("scripts")
2222
zapAddOn {
2323
addOnId.set("communityScripts")
2424
addOnName.set("Community Scripts")
25-
zapVersion.set("2.14.0")
25+
zapVersion.set("2.15.0")
2626
addOnStatus.set(AddOnStatus.ALPHA)
2727

2828
releaseLink.set("https://github.com/zaproxy/community-scripts/compare/v@PREVIOUS_VERSION@...v@CURRENT_VERSION@")
@@ -49,20 +49,20 @@ crowdin {
4949
}
5050

5151
dependencies {
52-
testImplementation("org.junit.jupiter:junit-jupiter:5.9.3")
52+
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
5353
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
5454

55-
testImplementation("commons-io:commons-io:2.13.0")
56-
testImplementation("org.assertj:assertj-core:3.24.2")
57-
testImplementation("org.apache.commons:commons-lang3:3.12.0")
55+
testImplementation("commons-io:commons-io:2.16.1")
56+
testImplementation("org.assertj:assertj-core:3.26.0")
57+
testImplementation("org.apache.commons:commons-lang3:3.14.0")
5858

5959
// The following versions should match the ones of the add-ons.
6060
testImplementation("org.codehaus.groovy:groovy-all:3.0.14")
6161
val graalJsVersion = "22.3.3"
6262
testImplementation("org.graalvm.js:js:$graalJsVersion")
6363
testImplementation("org.graalvm.js:js-scriptengine:$graalJsVersion")
6464
testImplementation("org.jruby:jruby-complete:1.7.4")
65-
testImplementation("org.zaproxy:zest:0.18.0")
65+
testImplementation("org.zaproxy:zest:0.21.0")
6666
testImplementation("org.python:jython-standalone:2.7.2")
6767
}
6868

gradle/wrapper/gradle-wrapper.jar

-9 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
3+
distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.

gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("org.zaproxy.common.settings") version "0.2.0"
2+
id("org.zaproxy.common.settings") version "0.3.0"
33
id("com.diffplug.spotless") version "6.25.0" apply false
44
}
55

src/test/java/org/zaproxy/VerifyScripts.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import org.jruby.embed.jsr223.JRubyEngineFactory;
5353
import org.junit.jupiter.api.AfterAll;
5454
import org.junit.jupiter.api.BeforeAll;
55+
import org.junit.jupiter.api.condition.JRE;
5556
import org.junit.jupiter.params.ParameterizedTest;
5657
import org.junit.jupiter.params.provider.Arguments;
5758
import org.junit.jupiter.params.provider.MethodSource;
@@ -102,6 +103,10 @@ private static Stream<Arguments> scriptsGroovy() {
102103
}
103104

104105
private static Stream<Arguments> scriptsJavaScript() {
106+
// Graal JS version being used does not yet support Java 22+
107+
if (JRE.JAVA_22.compareTo(JRE.currentVersion()) <= 0) {
108+
return testData(".js", script -> {});
109+
}
105110
Engine engine =
106111
Engine.newBuilder()
107112
.allowExperimentalOptions(true)

0 commit comments

Comments
 (0)