Skip to content

Commit 9e80159

Browse files
Upgrade Java target from 11 to 17
- Update sourceCompatibility and targetCompatibility to '17' in build.gradle - Update CI workflow to use JDK 17 (actions/setup-java@v4) - Update actions/checkout@v2 to v4 - Update actions/cache@v2 to v4 - Verified: no reflective access, removed APIs, or Java 17 incompatibilities in source code - All 68 tests pass with JDK 17
1 parent 7886b95 commit 9e80159

2 files changed

Lines changed: 36 additions & 2 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
tags:
8+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
9+
pull_request:
10+
branches:
11+
- '**'
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: zulu
24+
java-version: '17'
25+
- uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.gradle/caches
29+
~/.gradle/wrapper
30+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
31+
restore-keys: |
32+
${{ runner.os }}-gradle-
33+
- name: Test with Gradle
34+
run: ./gradlew clean test

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ plugins {
77
}
88

99
version = '0.0.1-SNAPSHOT'
10-
sourceCompatibility = '11'
11-
targetCompatibility = '11'
10+
sourceCompatibility = '17'
11+
targetCompatibility = '17'
1212

1313
spotless {
1414
java {

0 commit comments

Comments
 (0)