build(java): align toolchain and runtime to Java 25 (bytecode 17) - #1077
Conversation
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>
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>
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:
Profile B (target Java 25) — modules with a Micronaut runtime dependency, running on the Java 25 service runtime:
Naming/mechanics mirror the libseqera convention plugins ( Verification (JDK 25 toolchain, |
… 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>
68352e8 to
67c036f
Compare
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 toolchainJavaLanguageVersion.of(21)->of(25)(sourceCompatibility/targetCompatibilitystay at 17).buildSrc/.../io.seqera.wave.java-library-conventions.gradle: Gradle toolchainJavaLanguageVersion.of(21)->of(25)(sourceCompatibility/targetCompatibilitystay at 17)..github/workflows/build.yml: CI matrixjava_version: [21]->[25].Left unchanged (already compliant or intentionally excluded):
build.gradlejib image already usescorretto-25-al2023-jemalloc..github/workflows/security-submit-dependecy-graph.ymlkeepsjava-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.build.ymlruns on Java 25.🤖 Generated with Claude Code