Using Gradle Enterprise to Detect Configuration Regressions in an Android Gradle Build
Article Summary
Premise's mobile team caught a sneaky 3x build time regression that only showed up in CI. Here's how they hunted it down using Gradle Enterprise.
Android engineer Nate Ebel walks through a real debugging case study where PR builds suddenly slowed by 20%. The culprit? An AGP update that silently downloaded a 2GB NDK on every CI run.
Key Takeaways
- Gradle Enterprise trend data revealed 3x configuration time spike in GitHub Actions
- AGP 4.1 changed default NDK version not preinstalled on CI machines
- Pinning NDK versions across modules eliminated redundant 2GB downloads
- Created automated workflow to catch configuration regressions before merge
- gradle-profiler benchmarking isolated configuration time as the bottleneck
Critical Insight
By consolidating NDK versions in a precompiled script plugin and monitoring configuration time, Premise eliminated a hidden regression that was costing 20% on every PR build.