diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 693899b7..4ed8213b 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -50,7 +50,7 @@ jobs: - "check-docs" uses: playframework/.github/.github/workflows/cmd.yml@v3 with: - java: 17, 11 + java: 21, 17, 11 scala: 2.12.x, 2.13.x, 3.x cmd: scripts/test-code.sh gradle-build-root: gradle-twirl diff --git a/gradle-twirl/src/test/java/play/twirl/gradle/AbstractFunctionalTest.java b/gradle-twirl/src/test/java/play/twirl/gradle/AbstractFunctionalTest.java index 7cee2539..0df2839a 100644 --- a/gradle-twirl/src/test/java/play/twirl/gradle/AbstractFunctionalTest.java +++ b/gradle-twirl/src/test/java/play/twirl/gradle/AbstractFunctionalTest.java @@ -98,14 +98,17 @@ protected BuildResult build(String gradleVersion, String... args) { } static Stream gradleVersions() { - // https://docs.gradle.org/current/userguide/scala_plugin.html#sec:configure_zinc_compiler - if (getScalaVersion().equals("3")) { // Gradle 7.5+ - return Stream.of("7.6.2", "8.0.2", "8.7"); - } // https://docs.gradle.org/current/userguide/compatibility.html + if (JavaVersion.current().compareTo(JavaVersion.VERSION_21) >= 0) { // Gradle 8.4+ + return Stream.of("8.7"); + } if (JavaVersion.current().compareTo(JavaVersion.VERSION_17) >= 0) { // Gradle 7.3+ return Stream.of("7.6.2", "8.0.2", "8.7"); } + // https://docs.gradle.org/current/userguide/scala_plugin.html#sec:configure_zinc_compiler + if (getScalaVersion().equals("3")) { // Gradle 7.5+ + return Stream.of("7.6.2", "8.0.2", "8.7"); + } return Stream.of("7.1.1", "7.6.2", "8.0.2", "8.7"); } }