Skip to content

Commit e0850b3

Browse files
committed
upgrade to Java 21
1 parent 5e59ca2 commit e0850b3

File tree

12 files changed

+33
-19
lines changed

12 files changed

+33
-19
lines changed

.github/workflows/on-tag.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535
app_version: ${{ steps.capture_version.outputs.app_version }}
3636
steps:
3737
- uses: actions/checkout@v3
38-
- name: Set up JDK 17
38+
- name: Set up JDK 21
3939
uses: actions/setup-java@v3
4040
with:
41-
java-version: '17'
41+
java-version: '21'
4242
distribution: 'temurin'
4343
- name: Build with Gradle
4444
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629

.github/workflows/pr-merge-main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
with:
2727
ref: main
2828
token: ${{ secrets.REPO_TOKEN }}
29-
- name: Set up JDK 17
29+
- name: Set up JDK 21
3030
uses: actions/setup-java@v3
3131
with:
32-
java-version: '17'
32+
java-version: '21'
3333
distribution: 'temurin'
3434
- name: Build with Gradle
3535
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629

.github/workflows/push-branch.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v3
24-
- name: Set up JDK 17
24+
- name: Set up JDK 21
2525
uses: actions/setup-java@v3
2626
with:
27-
java-version: '17'
27+
java-version: '21'
2828
distribution: 'temurin'
2929
- name: Build with Gradle
3030
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:17
1+
FROM eclipse-temurin:21
22

33
# Use a build argument for version
44
ARG app_version=0.0.1-SNAPSHOT

assessment-api/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'org.openapi.generator' version '7.0.1'
3-
id 'org.springframework.boot' version '3.1.0'
3+
id 'org.springframework.boot'
44
}
55

66
apply plugin: "maven-publish"

assessment-service/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'org.springframework.boot' version '3.1.0'
2+
id 'org.springframework.boot'
33
id 'jacoco'
44
id 'checkstyle'
55
}

build.gradle

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'java'
33
id 'io.spring.dependency-management' version '1.1.0'
4+
id 'org.springframework.boot' version '3.2.5' apply false
45
id 'net.researchgate.release' version '3.0.2'
56
}
67

@@ -12,7 +13,11 @@ subprojects {
1213

1314
group = 'uk.gov.laa.ccms.caab'
1415

15-
sourceCompatibility = '17'
16+
java {
17+
toolchain {
18+
languageVersion = JavaLanguageVersion.of(JAVA_VERSION)
19+
}
20+
}
1621

1722
repositories {
1823
mavenCentral()

gradle.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
version=0.0.7-SNAPSHOT
2-
group='uk.gov.laa.ccms'
2+
group='uk.gov.laa.ccms'
3+
4+
JAVA_VERSION = 21

gradle/wrapper/gradle-wrapper.jar

1.29 KB
Binary file not shown.
+2-1
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-8.1.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

gradlew

+12-7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
9087

9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
@@ -143,12 +140,16 @@ fi
143140
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144141
case $MAX_FD in #(
145142
max*)
143+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
144+
# shellcheck disable=SC3045
146145
MAX_FD=$( ulimit -H -n ) ||
147146
warn "Could not query maximum file descriptor limit"
148147
esac
149148
case $MAX_FD in #(
150149
'' | soft) :;; #(
151150
*)
151+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
152+
# shellcheck disable=SC3045
152153
ulimit -n "$MAX_FD" ||
153154
warn "Could not set maximum file descriptor limit to $MAX_FD"
154155
esac
@@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
193194
done
194195
fi
195196

197+
198+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
199+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
200+
196201
# Collect all arguments for the java command;
197202
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198203
# shell script including quotes and variable substitutions, so put them in

gradlew.bat

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
2828
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

0 commit comments

Comments
 (0)