build(java): align toolchain and runtime to Java 25 - #99
Conversation
|
Updated this PR to the refined two-profile Java model from seqeralabs/adr#51 ( Classification: Change (build.gradle):
Verify: No Groovy sources in this module, so the Groovy |
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>
Bump wrapper distribution from 9.3.1 to 9.6.1; Java source/target unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… Profile B Java 25 for Micronaut) per adr#51 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
1f3c469 to
b8a7577
Compare
Summary
Aligns
tower-agentwith the org-wide Java guideline in seqeralabs/adr#51 (system/2026-07-23-java-version.md), which supersedes the 2024-12-03 Java 17/21 ADR: build on a Java 25 toolchain and target Java 25 bytecode.Profile classification
The ADR defines two profiles and picks the compile target per module by whether it depends on Micronaut:
--release 17target. For modules with no direct or indirect Micronaut dependency (shared libs, API models/clients, anything on the Nextflow classpath).--releasecap. For modules that explicitly require Micronaut at runtime.tower-agentis a single-module Micronaut runtime application — it appliesio.micronaut.applicationwithruntime("netty")and declares Micronautimplementationdependencies (build.gradle) — so it is Profile B. It is a standalone agent, never loaded by the Nextflow Java 17 runtime.What changed
build.gradle: Gradle toolchainJavaLanguageVersion.of(21)->of(25).build.gradle: addedsourceCompatibility/targetCompatibility = JavaVersion.VERSION_25.build.gradle: removedoptions.release = 21fromcompileJava(no--releasecap under Profile B)..github/workflows/build.yml:java-version: '21'->'25'(GraalVM setup + JReleaser setup)..github/workflows/build.yml: JReleasersetup-javadistributionadopt->corretto, the ADR's preferred Linux distribution..github/workflows/security_submit_dependencies.yml:java-version: '21'->'25'(GraalVM setup).gradle/wrapper: Gradle9.3.1->9.6.1, the ADR's mandated minimum.No Groovy sources in this module, so the ADR's separate Groovy
source/targetmechanism does not apply.Why
Micronaut 5 publishes Java-25-only artifacts, so any module with a Micronaut runtime dependency is necessarily Profile B. Adopting the Java 25 toolchain and target now keeps
tower-agenton the org-wide baseline and unblocks the eventual Micronaut 5 upgrade (this PR stays on Micronaut 4.6.2).Runtime impact
The release includes a
SINGLE_JARdistribution (tw-agent.jarinjreleaser.yml) that users run on their own JVM. Java 25 bytecode raises that jar's floor to JRE 25+ — previously 21, sincemasteralready targeted 21. The native-image binaries are self-contained and unaffected. This is a deliberate, accepted consequence of Profile B and should be called out in the release notes.How to verify
build.yml,security_submit_dependencies.yml) runs on Java 25 — all checks green on this branch../gradlew buildcompiles with a Java 25 toolchain; emitted bytecode is class-file major version 69 (Java 25).graalvm-communityandcorrettoboth provide Java 25 in the CI actions.🤖 Generated with Claude Code