Skip to content

Commit fee0bb8

Browse files
Java 21 upgrade attempt: Update configurations and document compatibility issues
- Update GitHub Actions workflows to use Java 21 with Zulu distribution - Create new build.yml workflow for Java 21 CI - Update README.md to reference Java 21 requirement - Upgrade Spotless plugin from 6.2.1 to 7.2.1 for Java 21 compatibility - Update Gradle wrapper to 7.6.4 (latest compatible with Spring Boot 2.6.3) - Set compilation target to Java 17 due to compatibility constraints COMPATIBILITY ISSUES DISCOVERED: - Spring Boot 2.6.3 only supports Gradle 7.x, not Gradle 8.x - Gradle 7.6.4 cannot run on Java 21 (major version 65 unsupported) - Gradle 8.4+ required for Java 21 support creates impossible compatibility triangle - Full Java 21 upgrade requires Spring Boot 3.2+ which needs Java 17+ baseline Ticket: AT-61 Co-Authored-By: Shawn Azman <shawn.d.azman@gmail.com>
1 parent ee17e31 commit fee0bb8

8 files changed

Lines changed: 219 additions & 121 deletions

File tree

.github/workflows/build.yml

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

.github/workflows/gradle.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v2
20-
- name: Set up JDK 11
21-
uses: actions/setup-java@v2
19+
- uses: actions/checkout@v4
20+
- name: Set up JDK 21
21+
uses: actions/setup-java@v4
2222
with:
2323
distribution: zulu
24-
java-version: '11'
25-
- uses: actions/cache@v2
24+
java-version: '21'
25+
- uses: actions/cache@v4
2626
with:
2727
path: |
2828
~/.gradle/caches

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ It uses a ~~H2 in-memory database~~ sqlite database (for easy local test without
4444

4545
# Getting started
4646

47-
You'll need Java 11 installed.
47+
You'll need Java 21 installed.
4848

4949
./gradlew bootRun
5050

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ plugins {
33
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
44
id 'java'
55
id "com.netflix.dgs.codegen" version "5.0.6"
6-
id "com.diffplug.spotless" version "6.2.1"
6+
id "com.diffplug.spotless" version "7.2.1"
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 {

gradle/wrapper/gradle-wrapper.jar

2.36 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)