Draft
Fix CI matrix: run tests on matrix JDK, not just the Gradle daemon JDK#279
Conversation
…roperty Co-authored-by: wmdietl <6699136+wmdietl@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Java 11 configuration in Gradle CI workflow
Fix CI matrix: run tests on matrix JDK, not just the Gradle daemon JDK
Mar 7, 2026
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.
The CI matrix's Java 11/17/25 entries weren't actually running tests on those JDKs. The Gradle daemon was pinned to JDK 21 (required by
settings.gradle's Java 17+ check), so compilation and test execution always happened on JDK 21. The "Launcher JVM: 11.0.30" in logs is just the thin Gradle client wrapper — the "Daemon JVM: JDK 21" is what runs the build.Changes
build.gradle: Read atestJavaExecutableGradle property in thetesttask and use it to set the test JVM executable, allowing the daemon (JDK 21) and test JVM to differ:test { if (project.hasProperty("testJavaExecutable")) { executable = project.property("testJavaExecutable").toString() } // ... }.github/workflows/gradle.yml: Extend the "Use JDK 21 for Gradle" step to also writetestJavaExecutable=$JAVA_HOME/bin/javainto~/.gradle/gradle.properties. At that pointJAVA_HOMEis the matrix JDK (lastsetup-javawins), so each matrix slot runs tests on its respective JDK while the Gradle daemon stays on JDK 21.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.