Skip to content

build(java): align toolchain and runtime to Java 25 - #99

Merged
cristianrcv merged 4 commits into
masterfrom
feat/NOTASK-align-java-25
Aug 18, 2026
Merged

build(java): align toolchain and runtime to Java 25#99
cristianrcv merged 4 commits into
masterfrom
feat/NOTASK-align-java-25

Conversation

@cristianrcv

@cristianrcv cristianrcv commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Aligns tower-agent with 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:

  • Profile A (default) — Java 25 toolchain, --release 17 target. For modules with no direct or indirect Micronaut dependency (shared libs, API models/clients, anything on the Nextflow classpath).
  • Profile B — Java 25 language and bytecode, no --release cap. For modules that explicitly require Micronaut at runtime.

tower-agent is a single-module Micronaut runtime application — it applies io.micronaut.application with runtime("netty") and declares Micronaut implementation dependencies (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 toolchain JavaLanguageVersion.of(21) -> of(25).
  • build.gradle: added sourceCompatibility / targetCompatibility = JavaVersion.VERSION_25.
  • build.gradle: removed options.release = 21 from compileJava (no --release cap under Profile B).
  • .github/workflows/build.yml: java-version: '21' -> '25' (GraalVM setup + JReleaser setup).
  • .github/workflows/build.yml: JReleaser setup-java distribution adopt -> corretto, the ADR's preferred Linux distribution.
  • .github/workflows/security_submit_dependencies.yml: java-version: '21' -> '25' (GraalVM setup).
  • gradle/wrapper: Gradle 9.3.1 -> 9.6.1, the ADR's mandated minimum.

No Groovy sources in this module, so the ADR's separate Groovy source/target mechanism 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-agent on 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_JAR distribution (tw-agent.jar in jreleaser.yml) that users run on their own JVM. Java 25 bytecode raises that jar's floor to JRE 25+ — previously 21, since master already 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

  • CI (build.yml, security_submit_dependencies.yml) runs on Java 25 — all checks green on this branch.
  • ./gradlew build compiles with a Java 25 toolchain; emitted bytecode is class-file major version 69 (Java 25).
  • graalvm-community and corretto both provide Java 25 in the CI actions.

🤖 Generated with Claude Code

@cristianrcv
cristianrcv requested a review from pditommaso July 8, 2026 13:50
@pditommaso

Copy link
Copy Markdown
Collaborator

Updated this PR to the refined two-profile Java model from seqeralabs/adr#51 (system/2026-07-23-java-version.md), superseding the earlier "Java 25 toolchain / bytecode 17 everywhere" approach.

Classification: tower-agent is a single-module Micronaut runtime application (it applies the Micronaut application plugin with runtime("netty") and declares implementation Micronaut dependencies), so it falls under Profile B — build on the Java 25 toolchain and target Java 25 (no --release 17 cap). Micronaut's Java-25-only artifacts make this the required profile; the agent is a standalone binary and is never loaded by the Nextflow Java-17 runtime.

Change (build.gradle):

  • Removed options.release = 17 from compileJava.
  • Added sourceCompatibility = JavaVersion.VERSION_25 / targetCompatibility = JavaVersion.VERSION_25 to the java {} block (kept the Java 25 toolchain).

Verify: ./gradlew compileJava passes on a JDK 25 toolchain; emitted bytecode is class-file major version 69 (Java 25), confirming Profile B.

No Groovy sources in this module, so the Groovy source/target mechanism does not apply here.

@cristianrcv
cristianrcv requested review from a team and ramonamela August 17, 2026 12:47
@cristianrcv cristianrcv changed the title build(java): align toolchain and runtime to Java 25 (bytecode 17) build(java): align toolchain and runtime to Java 25 Aug 18, 2026
cristianrcv and others added 4 commits August 18, 2026 18:45
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>
@cristianrcv
cristianrcv force-pushed the feat/NOTASK-align-java-25 branch from 1f3c469 to b8a7577 Compare August 18, 2026 16:46
@cristianrcv
cristianrcv merged commit 9a4b0b9 into master Aug 18, 2026
6 checks passed
@cristianrcv
cristianrcv deleted the feat/NOTASK-align-java-25 branch August 18, 2026 17:37
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.

3 participants