From 2027632bf28f4b2db5546d59b32db0e0bf4f621d Mon Sep 17 00:00:00 2001 From: Mariano Barrios Date: Wed, 1 Nov 2023 13:22:10 +0100 Subject: [PATCH] Build for Java 21 --- .github/workflows/main.yml | 8 ++++++-- build.gradle | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae58a1ae..8a12f2a0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,11 +8,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java-version: [ 8, 11, 17, 20 ] + java-version: [ 8, 11, 17 ] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: ${{ matrix.java-version }} + java-version: | + ${{ matrix.java-version }} + 21 + - run: export JAVA_VERSION=${{ matrix.java-version }} + - run: env - run: ./gradlew assemble check --info \ No newline at end of file diff --git a/build.gradle b/build.gradle index ce4b945a..c1de8c39 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,13 @@ plugins { id 'maven-publish' // pinned version due to Java 8 compatibility id "com.diffplug.spotless" version "6.11.0" - // pinned version due to https://github.com/spotbugs/spotbugs/issues/2041 - id "com.github.spotbugs" version "5.0.13" + id "com.github.spotbugs" version "5.2.1" +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } } compileJava {