There is a huge gap in configuration time when spotless plugin is applied in a multi-project build between windows and linux.
I've created a multiproject build with 150 projects to test this out:
Configuration time with spotless plugin
Configuration time without spotless plugin
In windows the difference is overwhelming, slowing down the overall build time.
Java 1.8
Spotless 3.15.0
Gradle 4.10.2
Windows 10
example project: projectA.zip
In projectA.gradle there is a boolean variable to activate spotless plugin called spotless_plugin. You can try to enable and disable it.
you can test this running from within the root projectA:
linux ./gradlew clean build --parallel --scan
windows gradlew.bat clean build --parallel --scan
Thanks for the interesting case. Until someone finds time to investigate the root cause, #277 should at least alleviate the symptoms of this.
Any news about this?
It's starting to be a pain even in linux.
Thanks
PR #277 would help your case. Its author has run out of time, but it is done except for tests. Anyone is welcome to finish off the PR :)
Looking at your file, you have a very broad target:
target fileTree(dir: project.rootDir, includes: [
"**/*.md",
"**/.gitignore",
"**/Jenkinsfile*"
], excludes: [
"**/build/**",
"**/bin/**",
"**/gen/**"
])
Your performance would improve greatly if you made those ** more specific. Having ** in the root project is especially troublesome, because it is searching in all of the child projects too, causing double-work.
PR #277 would help your case. Its author has run out of time, but it is done except for tests. Anyone is welcome to finish off the PR :)
Indeed! As the author of said PR, I wanted to apologise for my lack of activity or even acknowledgement that I'd run out of time (and energy) to continue working on it. I intend to say this on the PR within the next few days and to provide a pointer or two on how it could be finished.
I have done a really big mistake here!
target fileTree(dir: project.rootDir, includes: [
project.rootDir must be project.projectDir
DAMN!
sorry, my fault...