The Journey to Faster Android Builds: How Slice Slashed Build Times
Article Summary
Ankit Sharma from slice reveals how his team reclaimed 167 hours of developer time annually by tackling Android build performance head-on. Their systematic approach turned a productivity blocker into a competitive advantage.
The slice engineering team launched Project Flash to combat escalating build times as their Android app evolved from a simple financial product into a full-fledged bank. Through five targeted optimizations, they transformed their development workflow with measurable improvements in both local builds and CI efficiency.
Key Takeaways
- Affected module testing cut test execution time by 36% for most PRs
- Configuration cache enabled 43% faster incremental builds locally
- Migrating from KAPT to KSP reduced memory overhead and compilation times
- CI optimization saved 39,128 minutes annually (14% reduction in compute time)
- Dependency cleanup revealed hidden cross-module dependencies needing architectural fixes
Five strategic optimizations delivered 167 hours of annual developer time savings, 43% faster local builds, and 14% reduction in CI compute costs.
About This Article
Slice's multi-module Android architecture had hidden dependency chains that triggered unexpected rebuilds and ran the full test suite whenever someone changed code in unrelated modules, even for minor updates.
The team used the Dependency Analysis Gradle Plugin to find unused dependencies, transitive dependencies, and misplaced implementation/api declarations. They then removed duplicate dependencies and cleaned up unnecessary module clutter.
After disabling Jetifier following the AndroidX migration and removing redundant dependency processing, build times improved noticeably. The combined changes saved 39,128 minutes of CI compute time annually.