Avoid eager creation of tasks for Spotless plugin#617
Avoid eager creation of tasks for Spotless plugin#617bigdaz merged 3 commits intodiffplug:mainfrom bigdaz:lazy-task-creation
Conversation
Previously applying the Spotless plugin resulted in a many tasks to be created per subproject, even for an invocation like `gradle help`. Using "Task configuration avoidance" APIs means that these tasks will not be constructed if they will not be required in the task graph.
With this commit, running `./gradlew help -PspotlessModern=true` will no longer the `spotless`, `spotlessCheck` or `spotlessApply` tasks if they are not required for task execution. The only remaining task that is eagerly constructed is "spotlessInternalRegisterDependencies".
|
This LGTM, merge at will! If you have code-in-progress for the |
|
Thanks Ned. In the end I didn't bother trying to get rid of the I'm not sure what you intend for making FYI I'm having an issue running |
|
I can confirm that by deleting and re-creating my fork on GitHub, the above issue is resolved. |
|
Yup, def some transients in the master -> main transition :). I'll take a quick crack at the lazy idea I had, and I'll throw it up to get your feedback on its pros/cons vs |
|
Part of #601 |
Previously applying the Spotless plugin resulted in a many tasks to be created
per subproject, even for an invocation like
gradle help.Using "Task configuration avoidance" APIs means that these tasks will
not be constructed if they will not be required during task execution.