Skip to content

Commit 565464d

Browse files
committed
java 21
1 parent 8b0a6c7 commit 565464d

7 files changed

Lines changed: 30 additions & 33 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ jobs:
4545
# fetch-depth: 0
4646
# - name: Fetch tags
4747
# run: git fetch --tags --force
48-
# - name: Install Java 17
49-
# uses: actions/setup-java@v5
48+
# - uses: actions/setup-java@v5
5049
# with:
51-
# java-version: 17
50+
# java-version: 21
5251
# distribution: temurin
5352
# - name: Install SystemCore Toolchain
5453
# run: ./gradlew installSystemCoreToolchain
@@ -104,10 +103,9 @@ jobs:
104103
fetch-depth: 0
105104
- name: Fetch tags
106105
run: git fetch --tags --force
107-
- name: Install Java 17
108-
uses: actions/setup-java@v5
106+
- uses: actions/setup-java@v5
109107
with:
110-
java-version: 17
108+
java-version: 21
111109
distribution: temurin
112110
- name: Install pnpm
113111
uses: pnpm/action-setup@v4
@@ -145,10 +143,9 @@ jobs:
145143
fetch-depth: 0
146144
- name: Fetch tags
147145
run: git fetch --tags --force
148-
- name: Install Java 17
149-
uses: actions/setup-java@v5
146+
- uses: actions/setup-java@v5
150147
with:
151-
java-version: 17
148+
java-version: 21
152149
distribution: temurin
153150
- name: Install pnpm
154151
uses: pnpm/action-setup@v4
@@ -198,10 +195,9 @@ jobs:
198195
with:
199196
fetch-depth: 0
200197

201-
- name: Install Java 17
202-
uses: actions/setup-java@v5
198+
- uses: actions/setup-java@v5
203199
with:
204-
java-version: 17
200+
java-version: 21
205201
distribution: temurin
206202

207203
# grab all tags
@@ -240,10 +236,9 @@ jobs:
240236
- uses: actions/checkout@v6
241237
with:
242238
fetch-depth: 0
243-
- name: Install Java 17
244-
uses: actions/setup-java@v5
239+
- uses: actions/setup-java@v5
245240
with:
246-
java-version: 17
241+
java-version: 21
247242
distribution: temurin
248243
- run: git fetch --tags --force
249244
- run: ./gradlew photon-targeting:build photon-lib:build
@@ -347,10 +342,9 @@ jobs:
347342
- uses: actions/checkout@v6
348343
with:
349344
fetch-depth: 0
350-
- name: Install Java 17
351-
uses: actions/setup-java@v5
345+
- uses: actions/setup-java@v5
352346
with:
353-
java-version: 17
347+
java-version: 21
354348
distribution: temurin
355349
- name: Install pnpm
356350
uses: pnpm/action-setup@v4
@@ -435,10 +429,9 @@ jobs:
435429
runs-on: ${{ matrix.os }}
436430

437431
steps:
438-
- name: Install Java 17
439-
uses: actions/setup-java@v5
432+
- uses: actions/setup-java@v5
440433
with:
441-
java-version: 17
434+
java-version: 21
442435
distribution: temurin
443436
- uses: actions/download-artifact@v7
444437
with:

.github/workflows/dependency-submission.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ jobs:
1313
steps:
1414
- name: Checkout sources
1515
uses: actions/checkout@v6
16-
- name: Setup Java
17-
uses: actions/setup-java@v5
16+
- uses: actions/setup-java@v5
1817
with:
1918
distribution: 'temurin'
20-
java-version: 17
19+
java-version: 21
2120
- name: Generate and submit dependency graph
2221
uses: gradle/actions/dependency-submission@v5

.github/workflows/lint-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
fetch-depth: 0
6262
- uses: actions/setup-java@v5
6363
with:
64-
java-version: 17
64+
java-version: 21
6565
distribution: temurin
6666
- run: |
6767
set +e

.github/workflows/photon-api-docs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ jobs:
6060
fetch-depth: 0
6161
- name: Fetch tags
6262
run: git fetch --tags --force
63-
- name: Install Java 17
64-
uses: actions/setup-java@v5
63+
- uses: actions/setup-java@v5
6564
with:
66-
java-version: 17
65+
java-version: 21
6766
distribution: temurin
6867
- name: Build javadocs/doxygen
6968
run: |

photon-docs/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ task generateJavaDocs(type: Javadoc) {
119119
source exportedProjects.collect { project(it).sourceSets.main.allJava }
120120
classpath = files(exportedProjects.collect { project(it).sourceSets.main.compileClasspath })
121121

122-
options.links "https://docs.oracle.com/en/java/javase/17/docs/api/", "https://github.wpilib.org/allwpilib/docs/release/java/"
122+
options.links "https://docs.oracle.com/en/java/javase/21/docs/api/", "https://github.wpilib.org/allwpilib/docs/release/java/"
123123
options.addStringOption("tag", "pre:a:Pre-Condition")
124124
options.addBooleanOption("Xdoclint:html,missing,reference,syntax", true)
125125
options.addBooleanOption('html5', true)

shared/common.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ apply plugin: "java"
33
apply plugin: "jacoco"
44

55
java {
6-
sourceCompatibility = JavaVersion.VERSION_17
7-
targetCompatibility = JavaVersion.VERSION_17
6+
toolchain {
7+
languageVersion = JavaLanguageVersion.of(21)
8+
}
9+
sourceCompatibility = JavaVersion.VERSION_21
10+
targetCompatibility = JavaVersion.VERSION_21
811
}
912

1013
wpilibTools.deps.wpilibVersion = wpilibVersion

shared/javacommon.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ apply plugin: 'jacoco'
44
apply plugin: 'com.google.protobuf'
55

66
java {
7-
sourceCompatibility = JavaVersion.VERSION_17
8-
targetCompatibility = JavaVersion.VERSION_17
7+
toolchain {
8+
languageVersion = JavaLanguageVersion.of(21)
9+
}
10+
sourceCompatibility = JavaVersion.VERSION_21
11+
targetCompatibility = JavaVersion.VERSION_21
912
}
1013

1114
def baseArtifactId = nativeName

0 commit comments

Comments
 (0)