Fix CI: run Gradle on JDK 21, let toolchain resolve JDK 25
CI / build (push) Failing after 1m31s

Gradle 8.11.1 can target JDK 25 via toolchains but can't launch its
own daemon on it yet. Install both JDKs in CI with 21 last so it
becomes JAVA_HOME, while JDK 25 stays available for the toolchain via
JAVA_HOME_25_X64 (same fix validated in the local build).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Michael Burgess
2026-08-08 08:45:34 -04:00
co-authored by Claude Sonnet 5
parent 8a6b835c50
commit 38fbdd22ab
+8 -2
View File
@@ -13,11 +13,17 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up JDK 25 # Gradle 8.11.1 cannot run its own daemon on JDK 25 yet, but the plugin's
# toolchain targets 25 (required by the Paper 26.2 API). Install both:
# JDK 21 last so it becomes JAVA_HOME (runs Gradle itself), while JDK 25
# stays discoverable via JAVA_HOME_25_X64 for Gradle's toolchain to use.
- name: Set up JDKs
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: temurin distribution: temurin
java-version: "25" java-version: |
25
21
- name: Grant execute permission for gradlew - name: Grant execute permission for gradlew
run: chmod +x gradlew run: chmod +x gradlew