From 38a0e63a55b52b5c038d85b2c6eb31eac91241a7 Mon Sep 17 00:00:00 2001 From: Mariano Barrios Date: Wed, 1 Nov 2023 12:01:33 +0100 Subject: [PATCH] Revert "Build for Java 21" This reverts commit 09b5aaa19c7f77209201beba2cb6ef3820eb607f. --- .github/workflows/main.yml | 2 +- build.gradle | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0f64085d..ae58a1ae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java-version: [ 8, 11, 17, 21 ] + java-version: [ 8, 11, 17, 20 ] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v3 diff --git a/build.gradle b/build.gradle index 71664e8b..ce4b945a 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,10 @@ plugins { id 'scala' id 'signing' id 'maven-publish' - id "com.diffplug.spotless" version "6.22.0" - id "com.github.spotbugs" version "5.2.1" + // 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" } compileJava { @@ -37,8 +39,7 @@ dependencies { spotless { java { - // remove when spotless moved to this Palantir version - palantirJavaFormat("2.38.0") + palantirJavaFormat() } scala { scalafmt('3.7.1').configFile('.scalafmt.conf') @@ -47,7 +48,7 @@ spotless { // There are some compatibility issues with spotless older Java versions, // but we don't need to cross-do style checks anyway -if (JavaVersion.current().ordinal() < JavaVersion.VERSION_21.ordinal()) { +if (JavaVersion.current().ordinal() < JavaVersion.VERSION_17.ordinal()) { tasks.findByName("spotlessScala").enabled(false) tasks.findByName("spotlessJava").enabled(false) }