David Burström
David Burström
Hi! Will this PR be worked on?
You probably also already noticed this, but it's not even necessary to run any Spotless tasks: `./gradlew gradleBuild compileJava` is enough to provoke the issue. But as you point out,...
It could certainly be a Gradle bug, would be good to rule out Spotless from the equation.
I tried with ```kotlin subprojects { if (!project.rootProject.tasks.names.contains("dummy")) { project.rootProject.tasks.register("dummy", DefaultTask::class.java) } else { println("contains dummy") } } ``` which should be the equivalent of applying the plugin, but it...
The fact that there's a reference to the `Gradle` instance makes my spidey-sense tingle, though I'm not sure if or how that can introduce any unexpected cross-talk: https://github.com/diffplug/spotless/blob/main/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/RegisterDependenciesTask.java#L65
@MatFl I also came to the same conclusion: If there is no sourceSet set, the `sourceDirs` `Set` will be uninitialized. From my point of view, initializing it in the constructor...
I just came across this issue too. It looks like a problem is that the task input is marked as internal: https://github.com/spotbugs/spotbugs-gradle-plugin/blob/ba591fbb3d8016c28bb2e6d7231087e286cccc8a/src/main/groovy/com/github/spotbugs/snom/SpotBugsTask.groovy#L447
That is all good and well, but I was referring to CI builds (clean builds, as per Gradle recommendations), in which I believe your caching mechanism does not come into...
Alternative workaround. It handles any source sets and any project structure. Apply it on every project that applies plugin `org.jlleitschuh.gradle.ktlint`: ```groovy project.tasks.withType(org.jlleitschuh.gradle.ktlint.tasks.GenerateReportsTask).configureEach { dependsOn project.tasks.named('runKtlintFormatOverKotlinScripts') } project.tasks.withType(org.jlleitschuh.gradle.ktlint.tasks.KtLintFormatTask).configureEach { if (name...
> Alternative workaround. It handles any source sets and any project structure. Apply it on every project that applies plugin `org.jlleitschuh.gradle.ktlint`: > > ```groovy > project.tasks.withType(org.jlleitschuh.gradle.ktlint.tasks.GenerateReportsTask).configureEach { > dependsOn project.tasks.named('runKtlintFormatOverKotlinScripts')...