Skip to content

Commit de6d533

Browse files
authored
Fix spotless cache configuration (#15531)
1 parent 671b2e9 commit de6d533

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

conventions/src/main/kotlin/otel.spotless-conventions.gradle.kts

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@ spotless {
1414
toggleOffOn()
1515
target("src/**/*.java")
1616
}
17-
plugins.withId("groovy") {
18-
groovy {
19-
licenseHeaderFile(
20-
rootProject.file("buildscripts/spotless.license.java"),
21-
"(package|import|(?:abstract )?class)"
22-
)
23-
endWithNewline()
24-
}
25-
}
2617
plugins.withId("scala") {
2718
scala {
2819
scalafmt()
@@ -103,6 +94,15 @@ if (project == rootProject) {
10394
trimTrailingWhitespace()
10495
endWithNewline()
10596
}
97+
groovy {
98+
target("**/*.groovy")
99+
targetExclude("buildscripts/codenarc.groovy")
100+
licenseHeaderFile(
101+
rootProject.file("buildscripts/spotless.license.java"),
102+
"(package|import|(?:abstract )?class)"
103+
)
104+
endWithNewline()
105+
}
106106
predeclareDeps()
107107
}
108108

@@ -121,8 +121,3 @@ if (project == rootProject) {
121121
}
122122
}
123123
}
124-
125-
// Disable configuration cache for spotlessGroovy task which is not compatible
126-
tasks.matching { it.name.contains("spotlessGroovy") }.configureEach {
127-
notCompatibleWithConfigurationCache("Spotless Groovy task references other Task instances which are not supported with configuration cache")
128-
}

0 commit comments

Comments
 (0)