Skip to content

Fix CI matrix: run tests on matrix JDK, not just the Gradle daemon JDK#279

Draft
wmdietl with Copilot wants to merge 4 commits into
masterfrom
copilot/sub-pr-278
Draft

Fix CI matrix: run tests on matrix JDK, not just the Gradle daemon JDK#279
wmdietl with Copilot wants to merge 4 commits into
masterfrom
copilot/sub-pr-278

Conversation

Copilot AI commented Mar 7, 2026

Copy link
Copy Markdown

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 a testJavaExecutable Gradle property in the test task 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 write testJavaExecutable=$JAVA_HOME/bin/java into ~/.gradle/gradle.properties. At that point JAVA_HOME is the matrix JDK (last setup-java wins), 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.

Base automatically changed from ci-jdk11 to master March 7, 2026 21:29
…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
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