The Hitchhiker's Guide to Gradle Troubleshooting
summary
Deep dive into Gradle internals: how up-to-date checks, local and remote build cache keys (inspecting the tar.gz entries), and the configuration cache serialization work, plus why multiple Gradle and Kotlin compile daemons spawn (different JVMs/args) and how to force a fresh run with --rerun-tasks or --no-build-cache. Live demos include a get-answer task writing “42”, creating a fake cache TGZ to avoid waiting, running a Java -jar build-cache-node, attaching VisualVM, remote-debugging Gradle source to inspect the work graph (3,500 modules seen), and using the async profiler to produce flame graphs.
AI-written summary · about
chapters (13)
- 0:00Introduction to Gradle troubleshooting
- 1:04Gradle build lifecycle explained
- 4:34Why Gradle daemons matter
- 9:56Build cache deep dive
- 13:32Configuration cache overview
- 16:17Managing Gradle daemons
- 23:41Debugging Gradle build logic
- 26:48Debugging Gradle source code
- 31:23Develocity plugin insights
- 37:01Task graph visualization
- 38:03Profiling Gradle daemon
- 40:50Flame graph analysis
- 41:11Closing remarks and Q&A
