Skip to content

Commit

Permalink
Merge pull request #786 from mkurz/test_java_21
Browse files Browse the repository at this point in the history
Run tests with Java 21 also
  • Loading branch information
mkurz authored May 3, 2024
2 parents 23276a8 + 9f8956c commit df770cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,17 @@ protected BuildResult build(String gradleVersion, String... args) {
}

static Stream<String> 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");
}
}

0 comments on commit df770cc

Please sign in to comment.