From fffb2d61427351f719b4e4dc5e1be11c2ec920c6 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Sat, 23 Nov 2024 11:38:01 -0800 Subject: [PATCH 1/2] Update Google Java Format to 1.25.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1cc5d57d0..6355b3a91 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] eclipse = "4.30.0" eclipse-wst-jsdt = "1.0.201.v2010012803" -google-java-format = "1.24.0" +google-java-format = "1.25.0" ktfmt = "0.44" spotless = "6.25.0" From e28cc7f2a4310d56d7baf81e18ae2aeaef7f638f Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Sat, 23 Nov 2024 12:34:48 -0800 Subject: [PATCH 2/2] Disble GJF for JDK versions earlier than 17 --- .../src/main/kotlin/com/ibm/wala/gradle/java.gradle.kts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-logic/src/main/kotlin/com/ibm/wala/gradle/java.gradle.kts b/build-logic/src/main/kotlin/com/ibm/wala/gradle/java.gradle.kts index d660abde3..aca03bd96 100644 --- a/build-logic/src/main/kotlin/com/ibm/wala/gradle/java.gradle.kts +++ b/build-logic/src/main/kotlin/com/ibm/wala/gradle/java.gradle.kts @@ -164,3 +164,8 @@ spotless { .toString()) } } + +// Google Java Format versions 1.25.0 and higher require Java 17 +tasks.named("spotlessJava") { + onlyIf { JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17) } +}