Repository navigation
Upgrade Gradle to 9.3.1 so the build runs on JDK 25 - #123
Merged
Merged
Conversation
The ubuntu-latest runner image moved to Ubuntu 26.04, whose default JDK is 25. CodeQL's default setup autobuilds with that JDK, and Gradle 8.14.3 cannot run on JDK 25 (IllegalArgumentException: 25.0.5), so "Analyze (java-kotlin)" has failed since 2026-11-01. - Upgrade the Gradle wrapper to 9.3.1. Gradle 9.1+ supports running on JDK 25; 9.3.x is the newest line whose embedded Kotlin (2.2.21) the project's Kotlin 2.1 compiler can still read. - Pin the JVM target to 11 for all modules (Kotlin jvmTarget, -Xjdk-release, Java source/target compatibility). Without it the target follows the JDK running Gradle, which breaks on JDK 25 and would raise published artifacts above Java 11 now that Gradle needs JDK 17+. Published bytecode and the org.gradle.jvm.version attribute stay at 11, as in 0.0.16. - Use Property<String> instead of Property<String?>; Gradle 9's nullability annotations reject nullable type arguments. - Run the main-branch test and publish jobs on JDK 17, since Gradle 9 requires JDK 17+ to run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
amorde
marked this pull request as ready for review
November 10, 2026 18:55
cheister
reviewed
Nov 11, 2026
cheister
approved these changes
Nov 11, 2026
handstandsam
approved these changes
Nov 11, 2026
Gradle 9.3.1 supports running on JDK 25, so the test and publish jobs can use it instead of 17. PR checks move to 25 too, so they test the same JDK as main. github-pages stays on 21 because it runs invert against external projects with their own Gradle versions. Dokka 2.0.0 fails on JDK 25 (IllegalArgumentException: 25.0.4 from its bundled IntelliJ version parsing), which would break javadoc jar generation in the publish jobs. Dokka 2.1.0 works on both JDK 17 and 25. Published artifacts still target Java 11 (class version 55, org.gradle.jvm.version 11). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
Analyze (java-kotlin)CodeQL check has failed onmainand on every PR since 2026-11-01. The cause is the runner image, not a code change:ubuntu-latestrunner moved from Ubuntu 24.04 (default JDK 17) to Ubuntu 26.04 (default JDK 25).6b707c0) passed on 2026-10-25 and failed on 2026-11-01. The CodeQL CLI and action versions were the same in both runs.From the failing autobuild log:
Changes
Gradle wrapper 8.14.3 → 9.3.1. Gradle can run on JDK 25 starting with 9.1. 9.3.x is the newest line that still bundles Kotlin 2.2.x; 9.4+ bundles Kotlin 2.3+, which the project's Kotlin 2.1 compiler can't read when compiling against
gradleApi(). Moving past 9.3 needs a Kotlin upgrade first.JVM target pinned to 11 for all modules (Kotlin
jvmTargetplus-Xjdk-release=11, Java source/target compatibility). Without a pin, the target follows the JDK running Gradle:Published bytecode (class version 55) and the plugin's
org.gradle.jvm.versionattribute stay at 11, the same as 0.0.16.Property<String?>→Property<String>inInvertExtensionandInvertTask. Gradle 9's nullability annotations reject nullable type arguments, andorNullstill returnsString?.CI runs on JDK 25. In
main.yml,test-ubuntu,publish-snapshotandpublish-releasemove from JDK 11 to 25 (Gradle 9 needs JDK 17+), and the PRtest-ubuntucheck moves from 17 to 25 to match.github-pagesstays on 21 because it runs invert against outside projects with their own Gradle versions.Dokka 2.0.0 → 2.1.0. Dokka 2.0.0 fails on JDK 25 (
IllegalArgumentException: 25.0.4from its bundled IntelliJ version parsing), which would break javadoc jar generation in the publish jobs. 2.1.0 works on both JDK 17 and 25.Testing
Run locally on JDK 25:
assemble check(72 tests, all passing),publishToMavenLocalinto a temp repo (all 8 javadoc jars generated), and:inverton theexamplesproject.publishToMavenLocalalso passes on JDK 17.Run locally before the JDK 25 bump:
JAVA_HOME: the sameclean, thentestClassessteps CodeQL autobuild runs. This failed before the change and passes after../gradlew assemble checkpublishToMavenLocalinto a temp repo, including the javadoc jars:inverton theexamplesprojectChecked bytecode: all JVM jars are class version 55 (Java 11).
Not run locally: the CI publish jobs (they need signing secrets) and the
github-pagesjob, which runs invert against outside projects. The CodeQL check on this PR confirms the fix.🤖 Generated with Claude Code