Skip to content

Commit 26c66e7

Browse files
build: pin project to JDK 25 and gradle CI to JDK 21
1 parent 263b19a commit 26c66e7

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,21 @@ jobs:
1212
- name: Checkout code
1313
uses: actions/checkout@v4
1414

15+
- name: Set up JDK 21 for Gradle to run on
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: 21
19+
distribution: 'temurin'
20+
1521
- name: Set up JDK 25
1622
uses: actions/setup-java@v4
1723
with:
1824
distribution: temurin
1925
java-version: 25-ea
2026
cache: gradle
2127

28+
- name: Inject JAVA_HOME_21_64 into `gradle.properties` to always use JDK 21 for Gradle
29+
run: mkdir ~/.gradle && echo "org.gradle.java.home=$JAVA_HOME_21_X64" >> ~/.gradle/gradle.properties
30+
2231
- name: Build with Gradle
2332
run: ./gradlew build

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,12 @@ subprojects {
77
repositories {
88
mavenCentral()
99
}
10+
11+
plugins.withId('java') {
12+
java {
13+
toolchain {
14+
languageVersion = JavaLanguageVersion.of(25)
15+
}
16+
}
17+
}
1018
}

0 commit comments

Comments
 (0)