From 2889e219afb6e0acca6e9da4d7db521917aca08c Mon Sep 17 00:00:00 2001 From: Patrick Boos Date: Wed, 27 Nov 2024 11:26:32 +0100 Subject: [PATCH] Use java 21 (#158) --- .github/workflows/check.yml | 6 +++--- .github/workflows/publish.yml | 6 +++--- .github/workflows/repository-maintenance.yml | 2 +- build.gradle | 4 +--- gradle/libs.versions.toml | 1 + 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2db2041..80bcd67 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,11 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '17' - distribution: 'adopt' + distribution: temurin + java-version: 21 - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1.0.6 - name: Checkstyle diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ed8f6fc..0c0bdd0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,11 +13,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '17' - distribution: 'adopt' + distribution: temurin + java-version: 21 - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1.0.6 - name: Build sourcesJar and javadocJar diff --git a/.github/workflows/repository-maintenance.yml b/.github/workflows/repository-maintenance.yml index e29d079..8229b77 100644 --- a/.github/workflows/repository-maintenance.yml +++ b/.github/workflows/repository-maintenance.yml @@ -16,7 +16,7 @@ jobs: name: Setup Java with: distribution: temurin - java-version: 17 + java-version: 21 - name: Generate and submit dependency graph uses: gradle/actions/dependency-submission@v4.1.0 with: diff --git a/build.gradle b/build.gradle index 980e45b..a802ff1 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,6 @@ plugins { alias(libs.plugins.nexus.publish) } -def javaVersion = providers.environmentVariable("JAVA_BUILD_VERSION").getOrElse("17") - apply from: "${rootDir}/gradle/publish-root.gradle" allprojects { @@ -14,7 +12,7 @@ allprojects { java { toolchain { - languageVersion = JavaLanguageVersion.of(javaVersion) + languageVersion = JavaLanguageVersion.of(libs.versions.java.get()) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c4704dc..a04d4bd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,4 +1,5 @@ [versions] +java = "21" spring-boot = "3.4.0" spring-dependency-management = "1.1.6" openapi-generator = "7.10.0"