-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Spotless gradle plugin execution fails with Gradle 8.0 #1572
Comments
I think you should move your spotless scala configuration below, where scala plugin is applied. The problem is that where it is right now it doesn't "understand" about scala, that's why it fails. This patch worked for me |
Thank you @cocorossello, your workaround does the trick ! This is also a valuable info for Spotless people (it will help them to provide permanent solution). |
I see same issue in kotlin multiplatform project:
|
Having the same issue with task updateGeneratedCode {
group BasePlugin.BUILD_GROUP
description "Updates src/generated/"
dependsOn(updateGeneratedCodeFromWsdls, updateGeneratedCodeFromXsds)
finalizedBy(updateWsdlsAvailableOnClasspath, "spotlessApply")
} Output:
Adding (Using spotless gradle plugin v6.18.0.) |
Hello, I'm having the same issue in a kotlin project. Using
When declaring the dependency explicitly, I'm getting this:
|
Similar for a simple spotless configuration @@ -30,10 +30,11 @@ plugins {
id 'com.adarshr.test-logger' version '4.0.0'
id 'jacoco'
id 'checkstyle'
+ id 'com.diffplug.spotless' version '6.22.0'
id 'org.openrewrite.rewrite' version '6.4.0'
id 'project-report'
id 'idea'
@@ -520,10 +521,19 @@ jacocoTestReport {
checkstyle {
// will only run when called explicitly from the command line
sourceSets = []
}
+spotless {
+ java {
+ importOrder('java', '', 'javax', '', 'org.jabref', '', '\\#')
+ removeUnusedImports()
+
+ // palantirJavaFormat()
+ }
+}
+
rewrite {
activeRecipe(
'org.jabref.config.rewrite.cleanup'
)
exclusion ( |
Note: related to apache/kafka#13205
Summary of the problem: 'spotlessScalaCheck' gradle task works as expected in isolation, but fails when combined with other Gradle tasks.
Gradle version: 8.0
Spotless Gradle plugin version: 6.15.0
Java version: 11
OS and version: Ubuntu 22.04
Reproducer: https://github.com/dejan2609/kafka/tree/gradle-8-java-11-spotlessPluginGradle-6.15.0
Step-by-step:
./gradlew -PscalaVersion=2.13 clean compileJava compileScala compileTestJava compileTestScala spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain rat --profile --continue -PxmlSpotBugsReport=true -PkeepAliveMode="session"
The text was updated successfully, but these errors were encountered: