Skip to content

Commit

Permalink
Work around Spotless conflict with Gradle configuration cache
Browse files Browse the repository at this point in the history
  • Loading branch information
liblit committed Apr 22, 2023
1 parent dd05b7e commit 89de874
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// plugin configuration must precede everything else
//

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 @@ -99,6 +100,11 @@ 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

0 comments on commit 89de874

Please sign in to comment.