From d4cc7377e3d4bcd81a2b6a01e4d5832fbf96ee0e Mon Sep 17 00:00:00 2001 From: Ibs Date: Wed, 15 Oct 2025 13:50:01 +0000 Subject: [PATCH 1/2] Migrate from Java 11 to Java 17 - Update sourceCompatibility and targetCompatibility to '17' in build.gradle - Update GitHub Actions workflow to use JDK 17 - Update README.md to specify Java 17 requirement - Upgrade Spotless plugin from 6.2.1 to 6.13.0 for Java 17 compatibility - Apply code formatting changes per updated Google Java Format All tests pass successfully with Java 17 (68 tests). --- .github/workflows/gradle.yml | 4 ++-- README.md | 2 +- build.gradle | 6 +++--- .../infrastructure/service/DefaultJwtServiceTest.java | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index fabe54421..0468aa6b5 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -17,11 +17,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: zulu - java-version: '11' + java-version: '17' - uses: actions/cache@v2 with: path: | diff --git a/README.md b/README.md index c747c5757..16f3c29bb 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ It uses a ~~H2 in-memory database~~ sqlite database (for easy local test without # Getting started -You'll need Java 11 installed. +You'll need Java 17 installed. ./gradlew bootRun diff --git a/build.gradle b/build.gradle index da384dc69..87e6016ef 100644 --- a/build.gradle +++ b/build.gradle @@ -3,12 +3,12 @@ plugins { id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' id "com.netflix.dgs.codegen" version "5.0.6" - id "com.diffplug.spotless" version "6.2.1" + id "com.diffplug.spotless" version "6.13.0" } version = '0.0.1-SNAPSHOT' -sourceCompatibility = '11' -targetCompatibility = '11' +sourceCompatibility = '17' +targetCompatibility = '17' spotless { java { diff --git a/src/test/java/io/spring/infrastructure/service/DefaultJwtServiceTest.java b/src/test/java/io/spring/infrastructure/service/DefaultJwtServiceTest.java index 12929118a..b2261705e 100644 --- a/src/test/java/io/spring/infrastructure/service/DefaultJwtServiceTest.java +++ b/src/test/java/io/spring/infrastructure/service/DefaultJwtServiceTest.java @@ -13,7 +13,8 @@ public class DefaultJwtServiceTest { @BeforeEach public void setUp() { - jwtService = new DefaultJwtService("123123123123123123123123123123123123123123123123123123123123", 3600); + jwtService = + new DefaultJwtService("123123123123123123123123123123123123123123123123123123123123", 3600); } @Test From edd58d8ca35b2ca48d63c764c2dac0d6fac2e329 Mon Sep 17 00:00:00 2001 From: Ibs Date: Wed, 15 Oct 2025 13:51:46 +0000 Subject: [PATCH 2/2] Update actions/cache to v4 to fix deprecated action warning GitHub has deprecated actions/cache v1 and v2. Updated to v4 to resolve CI failure. --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 0468aa6b5..93ecef1c3 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -22,7 +22,7 @@ jobs: with: distribution: zulu java-version: '17' - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | ~/.gradle/caches