Skip to content

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

Merged
pditommaso merged 11 commits into
masterfrom
feat/NOTASK-align-java-25
Jul 24, 2026
Merged

build(java): align toolchain and runtime to Java 25 (bytecode 17)#1077
pditommaso merged 11 commits into
masterfrom
feat/NOTASK-align-java-25

Conversation

@cristianrcv

Copy link
Copy Markdown
Contributor

Summary

Aligns the build toolchain and runtime to Java 25 while keeping the language level and bytecode target at Java 17. Implements the proposed org-wide standard in https://github.com/seqeralabs/adr/pull/48, which supersedes the 2024-12-03 Java 17/21 ADR.

What changed

  • buildSrc/.../io.seqera.wave.groovy-common-conventions.gradle: Gradle toolchain JavaLanguageVersion.of(21) -> of(25) (sourceCompatibility/targetCompatibility stay at 17).
  • buildSrc/.../io.seqera.wave.java-library-conventions.gradle: Gradle toolchain JavaLanguageVersion.of(21) -> of(25) (sourceCompatibility/targetCompatibility stay at 17).
  • .github/workflows/build.yml: CI matrix java_version: [21] -> [25].

Left unchanged (already compliant or intentionally excluded):

  • build.gradle jib image already uses corretto-25-al2023-jemalloc.
  • .github/workflows/security-submit-dependecy-graph.yml keeps java-version: 17.

Why

Standardize the JDK used to build and run Wave on Java 25 across local and CI environments, while continuing to produce Java 17 bytecode so runtime compatibility is unchanged.

How to verify

  • ./gradlew --version / build with a Java 25 toolchain resolves and compiles.
  • Compiled classes remain at bytecode level 17 (source/target compatibility untouched).
  • CI build.yml runs on Java 25.

🤖 Generated with Claude Code

cristianrcv and others added 6 commits July 8, 2026 14:55
Adopt Java 25 as the build toolchain and runtime (Gradle toolchain and
CI workflows) while keeping the language level and bytecode target at
Java 17.

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>
This job runs Gradle, which uses the pinned Java 25 toolchain; install
JDK 25 in setup-java so it matches the toolchain instead of forcing an
auto-provisioned download. Aligns with the Java 25 ADR (seqeralabs/adr#48).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Cristian Ramon-Cortes <cristian.ramon-cortes@seqera.io>
Gradle 8.x cannot run on Java 25 (buildSrc fails with "Unsupported class
file major version 69"); Gradle 9.1+ is required. Also add the JUnit
Platform launcher as testRuntimeOnly, which Gradle 9 no longer provides
automatically. Prerequisites for the Java 25 toolchain in seqeralabs/adr#48.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Cristian Ramon-Cortes <cristian.ramon-cortes@seqera.io>
JaCoCo before 0.8.14 cannot instrument Java 25 class files (test task
fails with "Unsupported class file major version 69"). Bump the JaCoCo
tool version so coverage works on the Java 25 toolchain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Cristian Ramon-Cortes <cristian.ramon-cortes@seqera.io>
The Groovy 4.0.15 compiler cannot process Java 25 class files
(compileTestGroovy fails with "Unsupported class file major version 69")
on the Java 25 toolchain. Bump to 4.0.31, matching the nextflow project.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Cristian Ramon-Cortes <cristian.ramon-cortes@seqera.io>
cristianrcv and others added 3 commits July 14, 2026 17:41
Flip sourceCompatibility/targetCompatibility from 17 to 25 in buildSrc convention plugins to align language/bytecode target with the Java 25 toolchain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Revert the source/target bump to 25: this project is customer-facing per the
Java 25 ADR (customer-deployed runtime and/or externally-consumed library),
so its language/bytecode level stays at Java 17 while still building and
running on the Java 25 toolchain. This reverts commit 31da16d.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pin nf-jdk base image to an immutable digest for reproducible builds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pditommaso

Copy link
Copy Markdown
Collaborator

Migrated to the two-profile Java model (adr#51)

Reworked this PR from the earlier "Java 25 toolchain / bytecode 17 everywhere" approach to the refined two-profile model defined in seqeralabs/adr#51.

Profile A (default, target Java 17) — plain libraries with no Micronaut runtime, consumed by the Nextflow Java-17 runtime:

  • wave-api, wave-utils
  • Set in io.seqera.wave.java-library-conventions: Java toolchain 25, JavaCompile { options.release = 17 }, GroovyCompile { sourceCompatibility/targetCompatibility = '17' }. Dropped sourceCompatibility/targetCompatibility = 17 from the java {} block (they conflict with --release on the same javac task).

Profile B (target Java 25) — modules with a Micronaut runtime dependency, running on the Java 25 service runtime:

  • the Wave backend app (root build.gradle) and io.seqera.wave.groovy-library-conventions (Micronaut minimal library)
  • options.release = null (dropped) + sourceCompatibility/targetCompatibility = '25' for both Java and Groovy.

io.seqera.wave.groovy-common-conventions keeps only the toolchain (25); the compile target is now decided by the applying convention.

Naming/mechanics mirror the libseqera convention plugins (io.seqera.java-library-conventions = Profile A, io.seqera.micronaut-library-conventions = Profile B).

Verification (JDK 25 toolchain, compileJava/compileGroovy across all modules): BUILD SUCCESSFUL. Bytecode confirmed: wave-api/wave-utils → major 61 (Java 17); Wave app → major 69 (Java 25).

pditommaso and others added 2 commits July 24, 2026 17:20
… 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>
@pditommaso
pditommaso force-pushed the feat/NOTASK-align-java-25 branch from 68352e8 to 67c036f Compare July 24, 2026 15:21
@pditommaso
pditommaso merged commit 2529160 into master Jul 24, 2026
3 checks passed
@pditommaso
pditommaso deleted the feat/NOTASK-align-java-25 branch July 24, 2026 15:27
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.

2 participants