Skip to content

build(java): align toolchain and runtime to Java 25 (bytecode 17)#641

Open
cristianrcv wants to merge 3 commits into
masterfrom
feat/NOTASK-align-java-25
Open

build(java): align toolchain and runtime to Java 25 (bytecode 17)#641
cristianrcv wants to merge 3 commits into
masterfrom
feat/NOTASK-align-java-25

Conversation

@cristianrcv

Copy link
Copy Markdown
Contributor

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.gradle
    • java.toolchain.languageVersion JavaLanguageVersion.of(21) -> of(25)
    • GraalVM native-image javaLauncher languageVersion of(21) -> of(25) (GraalVM version config left untouched)
    • compileJava options.release = 21 -> options.release = 17
  • .github/workflows/build.ymljava-version: '21' -> '25' (5 occurrences: GraalVM setup steps and JReleaser Java setup)
  • .github/workflows/security-submit-dependencies.ymljava-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 compileJava succeeds on a Java 25 toolchain and produces Java 17 bytecode (options.release = 17).
  • CI (build.yml, security-submit-dependencies.yml) provisions Java/GraalVM 25 and the native-image builds still succeed.

Reviewer notes

  • Bytecode target lowered 21 -> 17 (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.
  • GraalVM version pinning and native-image build args are intentionally unchanged; only the Java language/toolchain version was bumped.

🤖 Generated with Claude Code

cristianrcv and others added 3 commits July 8, 2026 14:57
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>
@cristianrcv cristianrcv requested a review from pditommaso July 8, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant