build(java): align toolchain and runtime to Java 25 (bytecode 17)#641
Open
cristianrcv wants to merge 3 commits into
Open
build(java): align toolchain and runtime to Java 25 (bytecode 17)#641cristianrcv wants to merge 3 commits into
cristianrcv wants to merge 3 commits into
Conversation
Adopt Java 25 as the build toolchain and runtime while setting the bytecode target to Java 17 (options.release 21 -> 17) to match the org-wide standard, and bump CI to Java 25. Follows the proposed org-wide standard in the Java 25 ADR (seqeralabs/adr#48), which supersedes the 2024-12-03 Java 17/21 ADR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Cristian Ramon-Cortes <cristian.ramon-cortes@seqera.io>
Switch the CI setup-java JDK distribution from Temurin to Amazon Corretto, following the Java 25 ADR (seqeralabs/adr#48), which specifies Amazon Corretto as the preferred distribution for Linux. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Cristian Ramon-Cortes <cristian.ramon-cortes@seqera.io>
Revert the bytecode target from 17 back to 21. tower-cli uses a Java 21 API (java.net.http.HttpClient became AutoCloseable in 21, used in a try-with-resources), so it cannot compile to Java 17 bytecode. As a CLI application (not a library consumed by other Java projects), the ADR's bytecode-17 interoperability requirement does not apply; it keeps the Java 25 toolchain/runtime and Corretto distribution. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Cristian Ramon-Cortes <cristian.ramon-cortes@seqera.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns tower-cli with the org-wide Java 25 standard (implements https://github.com/seqeralabs/adr/pull/48). Java 25 becomes the build toolchain and runtime, while the compiled bytecode target is set to Java 17.
What changed
build.gradlejava.toolchain.languageVersionJavaLanguageVersion.of(21)->of(25)javaLauncherlanguageVersionof(21)->of(25)(GraalVM version config left untouched)compileJavaoptions.release = 21->options.release = 17.github/workflows/build.yml—java-version: '21'->'25'(5 occurrences: GraalVM setup steps and JReleaser Java setup).github/workflows/security-submit-dependencies.yml—java-version: '21'->'25'Why
Adopts the proposed org-wide standard in the Java 25 ADR (seqeralabs/adr#48), which supersedes the 2024-12-03 Java 17/21 ADR: build with the current Java 25 toolchain/runtime while keeping a conservative Java 17 bytecode target for broad runtime compatibility.
How to verify
./gradlew compileJavasucceeds on a Java 25 toolchain and produces Java 17 bytecode (options.release = 17).build.yml,security-submit-dependencies.yml) provisions Java/GraalVM 25 and the native-image builds still succeed.Reviewer notes
options.release = 21->17). This is a deliberate downgrade per the ADR. If any source or dependency requires Java 18-21 language/API features, the CI compile will fail. Please confirm the codebase does not rely on Java 18-21-only features.🤖 Generated with Claude Code