spotless
spotless copied to clipboard
7.0.0.BETA1: Multiple steps with name 'google-java-format' for spotless format 'java'
plugins {
id 'com.diffplug.spotless' version '7.0.0.BETA1'
}
spotless {
java {
target("compatLib/**/src/**/*.java")
googleJavaFormat().aosp()
removeUnusedImports()
}
kotlin {
target("lawnchair/src/**/*.kt")
ktlint().customRuleSets([
"io.nlopez.compose.rules:ktlint:0.4.3",
]).editorConfigOverride([
"ktlint_compose_compositionlocal-allowlist": "disabled",
])
}
}
Could not determine the dependencies of task ':spotlessApply'.
> Could not create task ':spotlessJavaApply'.
> Could not create task ':spotlessJava'.
> Multiple steps with name 'google-java-format' for spotless format 'java'
Reproducer: https://github.com/LawnchairLauncher/lawnchair/pull/4450
removeUnusedImports() is conflicted with googleJavaFormat().
Facing this as well. Any workaround so far?
Workaround: remove removeUnusedImports().
It's because the removeUnusedImports step is naming itself google-java-format. Easy to fix with a bit of plumbing...
Fixed in 7.0.0