Gradle pipeline optimisation: Beyond basics
summary
Concrete steps and measured outcomes for speeding Gradle builds: full local build time drops from ~40 to ~12 minutes and CI builds to ~6 minutes after caching and modular work, configuration time falls from 41s to 17s, converting Android library modules to compileOnly + jar transform cuts tasks from 33 to 14 and halves artifact size, Redis-backed build cache reduces build time ~20%, GraalVM yields ~4% faster compiles while OpenJ9 uses ~20% less memory, RAM disk halves heavy IO builds, and removing PowerMock trims test time ~25% and ~4 GB memory.
AI-written summary · about
chapters (15)
- 0:00Introduction and motivation
- 2:09Gradle build time challenges
- 5:20Resource allocation strategies
- 9:53Project configuration time
- 18:19Plugin optimization techniques
- 24:36Dagger and kapt optimizations
- 27:26Build cache improvements
- 33:01Alternative JVM testing
- 36:11Android Lint optimizations
- 37:17Compile-only dependencies
- 39:48Unit test performance
- 42:15RAM disk for IO-bound builds
- 44:01Esoteric Gradle methods
- 45:23Future Gradle improvements
- 46:26Conclusion and key takeaways
