Skip to content

Commit

Permalink
Upgrade to Spotless 6.23.3
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
liblit committed Dec 9, 2023
1 parent b681c87 commit 7a13052
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 27 deletions.
7 changes: 0 additions & 7 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@file:Suppress("UnstableApiUsage")

import com.diffplug.spotless.LineEnding.PLATFORM_NATIVE

plugins {
`kotlin-dsl`
`kotlin-dsl-precompiled-script-plugins`
Expand All @@ -23,11 +21,6 @@ dependencies {
kotlin.jvmToolchain { languageVersion = JavaLanguageVersion.of(11) }

spotless {
// Workaround for <https://github.com/diffplug/spotless/issues/1644>
// using idea found at
// <https://github.com/diffplug/spotless/issues/1527#issuecomment-1409142798>.
lineEndings = PLATFORM_NATIVE

val ktfmtVersion = libs.versions.ktfmt.get()

kotlin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -178,11 +177,6 @@ if (project.gradle.parent != null) {
}

spotless {
// Workaround for <https://github.com/diffplug/spotless/issues/1644>
// using idea found at
// <https://github.com/diffplug/spotless/issues/1527#issuecomment-1409142798>.
lineEndings = PLATFORM_NATIVE

java {
googleJavaFormat(
rootProject.versionCatalogs
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -43,11 +42,6 @@ tasks.register<DependencyReportTask>("allDeps") {}
//

spotless {
// Workaround for <https://github.com/diffplug/spotless/issues/1644>
// using idea found at
// <https://github.com/diffplug/spotless/issues/1527#issuecomment-1409142798>.
lineEndings = PLATFORM_NATIVE

findProperty("spotless.ratchet.from")?.let { ratchetFrom(it as String) }

kotlinGradle {
Expand Down
6 changes: 0 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down Expand Up @@ -101,11 +100,6 @@ shellcheck {

tasks.named("shellcheck") { group = "verification" }

// Workaround for <https://github.com/diffplug/spotless/issues/1644>
// using idea found at
// <https://github.com/diffplug/spotless/issues/1527#issuecomment-1409142798>.
spotless.lineEndings = PLATFORM_NATIVE

// install Java reformatter as git pre-commit hook
tasks.register<Copy>("installGitHooks") {
from("config/hooks/pre-commit-stub")
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -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" }

Expand Down

0 comments on commit 7a13052

Please sign in to comment.