Skip to content
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

7.0.0.BETA1: Multiple steps with name 'google-java-format' for spotless format 'java' #2159

Open
Goooler opened this issue Jun 4, 2024 · 3 comments
Labels

Comments

@Goooler
Copy link
Contributor

Goooler commented Jun 4, 2024

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: LawnchairLauncher/lawnchair#4450

@Goooler
Copy link
Contributor Author

Goooler commented Jun 5, 2024

removeUnusedImports() is conflicted with googleJavaFormat().

@namero999
Copy link

Facing this as well. Any workaround so far?

@Goooler
Copy link
Contributor Author

Goooler commented Jun 6, 2024

Workaround: remove removeUnusedImports().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants