-
Notifications
You must be signed in to change notification settings - Fork 461
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
Allow configuration of when to run spotless in gradle build #27
Comments
If you'd like to remove afterEvaluate {
tasks.getByName('check').dependsOn.remove(tasks.getByName('spotlessCheck'))
} We're going to keep the default behavior of adding |
Thanks for the workaround, good enough for our case. 👍 |
It's a good question, and GitHub's issue search is very good. Hopefully others who have this same issue will find this question. I try to make the readme describe the project as concisely as possible. I believe this use case is a less <10% case, and thus doesn't earn a spot. As evidence, if your use case was more common, then every stylechecker / static analyzer / unit test runner in the gradle ecosystem should have this in their readme. |
Also, out of curiosity, why do you not want |
We like to separate concerns in the build on CI Also, we like to keep the build as fast as possible during development to achieve small turnaround times. |
Here's gradle's task dependency graph: If you'd like to just compile and package, run The objective of the
You can use Gradle however you'd like, but it sounds like you're swimming upstream :) If you want people to always be able to run Also, spotless is much faster than a reasonable unit test suite :) |
as a matter of fact you are totally right both in "when the task is called" and in the statement that spotless is much faster ;-) |
For anyone else stumbling upon this from Google: this has been added in the meantime. spotless {
isEnforceCheck = false
} See the plugin-gradle/README.md |
Currently spotless adds itself automatically to the gradle checkTask.
We would like to be able to decide when to actually run the spotless task or even be able to only run it when directly invoked from the command line like
gradlew spotless
e.g. for configuration
The text was updated successfully, but these errors were encountered: