Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests with Java 21 also #786

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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");
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ihostage I had to adjust this section, because Java 21 is supported by gradle 8.4+, so I moved the java checks to the top. Should be good.

return Stream.of("7.1.1", "7.6.2", "8.0.2", "8.7");
}
}
Loading