Our team has a gradle multiproject consisting of well over 100 projects and growing.
This causes two problems:
- The box we run gradle build on does not have enough disk space to store all the projects in a built state at the same time
- The build takes several hours to complete
We have 16 servers at our disposal that we would like to use to reduce the build time and individual disk usage by distributing the load. After reading gradle documentation we haven't been able to find a way to do this, or find anyone else in the same boat.
We have mitigated the first problem by creating a custom task:
task release(type: GradleBuild){
tasks = ['clean', 'build', 'deploy', 'clean']
}
Running gradlew release
runs all 4 tasks for each project before moving on to the next project (though I feel like there should be a better way). Without this task, clean would run for all projects, then build would run for all and die due to lack of disk space before ever getting to deploy.
We have not found a way to mitigate the build time issue.
Is there any way for us to utilize all of our servers to distribute this massive build?