-
Notifications
You must be signed in to change notification settings - Fork 459
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
Could not determine the dependencies of task ':spotlessCheck' (6.23.3) #1965
Comments
Just saw that it might be a problem with the google code format: |
Related to #1944. Can you provide me with a minimum reproducer? |
Workaround to use |
Sure, here you go: The problem arises with the option With Google Java Format version |
That makes sense, you may remove spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GradleProvisioner.java Lines 124 to 130 in a6495ed
|
As a workaround you could also try to apply configurations.all {
def importantConfigurations = ['compile', 'testCompile', 'runtime', 'testRuntime', 'implementation', 'testImplementation']
if (importantConfigurations.stream().anyMatch(it.name::startsWith)) {
it.resolutionStrategy {
failOnVersionConflict()
}
}
else {
println "Skipping ${it.name}"
}
} I haven't found a more elegant way to say: "only fail for Java configurations". |
Nice. Extends your workaround a bit, you can match configurations.configureEach {
if (it.name.startsWith("spotless")) {
// Workaround for https://github.com/diffplug/spotless/issues/1965.
} else {
it.resolutionStrategy {
failOnVersionConflict()
}
}
} |
Thanks! I like that even better! |
Since version
6.23.3
(Gradle) our builds fail when executing./gradlew spotlessCheck
because of the following error:We use the Google Code Format in version
1.18.1
and Java17
.Does someone have an idea how we can fix this? It worked fine before.
Full stacktrace:
The text was updated successfully, but these errors were encountered: