From 7a1305234d9cfdbbccee17808a77cc3b5b59d7a7 Mon Sep 17 00:00:00 2001 From: Ben Liblit Date: Sat, 9 Dec 2023 17:30:45 -0500 Subject: [PATCH] Upgrade to Spotless 6.23.3 In addition to the usual automated tests, I've also manually verified that `./gradlew compile{,Test}Java` succeeds and correctly uses the configuration cache on an M2 macOS machine using either Java 11 or 17. So these changes should not cause a regression of #1230 or #1278. --- build-logic/build.gradle.kts | 7 ------- .../src/main/kotlin/com/ibm/wala/gradle/java.gradle.kts | 6 ------ .../src/main/kotlin/com/ibm/wala/gradle/project.gradle.kts | 6 ------ build.gradle.kts | 6 ------ gradle/libs.versions.toml | 2 +- settings.gradle.kts | 2 +- 6 files changed, 2 insertions(+), 27 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 7e7b2dfdb1..682d79d90a 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -1,7 +1,5 @@ @file:Suppress("UnstableApiUsage") -import com.diffplug.spotless.LineEnding.PLATFORM_NATIVE - plugins { `kotlin-dsl` `kotlin-dsl-precompiled-script-plugins` @@ -23,11 +21,6 @@ dependencies { kotlin.jvmToolchain { languageVersion = JavaLanguageVersion.of(11) } spotless { - // Workaround for - // using idea found at - // . - lineEndings = PLATFORM_NATIVE - val ktfmtVersion = libs.versions.ktfmt.get() kotlin { 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 def66ff435..f0456d590c 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 @@ -4,7 +4,6 @@ package com.ibm.wala.gradle // Build configuration for subprojects that include Java source code. -import com.diffplug.spotless.LineEnding.PLATFORM_NATIVE import net.ltgt.gradle.errorprone.errorprone plugins { @@ -178,11 +177,6 @@ if (project.gradle.parent != null) { } spotless { - // Workaround for - // using idea found at - // . - lineEndings = PLATFORM_NATIVE - java { googleJavaFormat( rootProject.versionCatalogs diff --git a/build-logic/src/main/kotlin/com/ibm/wala/gradle/project.gradle.kts b/build-logic/src/main/kotlin/com/ibm/wala/gradle/project.gradle.kts index 211ccc2727..a41069ed46 100644 --- a/build-logic/src/main/kotlin/com/ibm/wala/gradle/project.gradle.kts +++ b/build-logic/src/main/kotlin/com/ibm/wala/gradle/project.gradle.kts @@ -1,6 +1,5 @@ package com.ibm.wala.gradle -import com.diffplug.spotless.LineEnding.PLATFORM_NATIVE import org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry import org.gradle.plugins.ide.eclipse.model.Classpath @@ -43,11 +42,6 @@ tasks.register("allDeps") {} // spotless { - // Workaround for - // using idea found at - // . - lineEndings = PLATFORM_NATIVE - findProperty("spotless.ratchet.from")?.let { ratchetFrom(it as String) } kotlinGradle { diff --git a/build.gradle.kts b/build.gradle.kts index b789944d2c..98c1368486 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,6 @@ // import com.diffplug.gradle.pde.EclipseRelease -import com.diffplug.spotless.LineEnding.PLATFORM_NATIVE import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask buildscript { dependencies.classpath(libs.commons.io) } @@ -101,11 +100,6 @@ shellcheck { tasks.named("shellcheck") { group = "verification" } -// Workaround for -// using idea found at -// . -spotless.lineEndings = PLATFORM_NATIVE - // install Java reformatter as git pre-commit hook tasks.register("installGitHooks") { from("config/hooks/pre-commit-stub") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5d66ac12f8..71b02d0d27 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ eclipse = "4.21.0" eclipse-wst-jsdt = "1.0.201.v2010012803" google-java-format = "1.17.0" ktfmt = "0.44" -spotless = "6.20.0" +spotless = "6.23.3" [libraries] android-tools = "com.android.tools:r8:2.2.42" diff --git a/settings.gradle.kts b/settings.gradle.kts index c51b9acce0..65c52f5c21 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,4 @@ -buildscript { dependencies { classpath("com.diffplug.spotless:spotless-lib-extra:2.34.1") } } +buildscript { dependencies { classpath("com.diffplug.spotless:spotless-lib-extra:2.43.1") } } plugins { id("com.diffplug.configuration-cache-for-platform-specific-build") version "3.44.0" }