Spotify Introduces Ruler: Our Tool for Measuring Android App Size
Original post Introducing Ruler: Our Tool for Measuring Android App Size
Article Summary
Spotify just open-sourced the tool that helped them slash their Android app size by 9%. If you've ever struggled to understand which modules are bloating your APK, you need to see this.
Spotify's engineering team built Ruler, a Gradle plugin that solves a problem every large Android app faces: tracking exactly how much each of your 1,000+ modules and hundreds of dependencies contribute to app size. They've been using it internally for six months and just released it to the community.
Key Takeaways
- Ruler tracks both download size and install size for every file in your APK
- Analyzes ownership data to show which teams contribute most to app bloat
- Spotify runs it on every PR to prevent size regressions before merge
- Achieved 9% app size reduction in six months using Ruler's insights
Ruler gives you module-level and dependency-level app size attribution that existing tools like Diffuse and Android Studio can't provide at scale.
Continue reading
This page summarizes “Introducing Ruler: Our Tool for Measuring Android App Size” by Spotify, published Feb 14, 2022. All credit for the original work goes to the authors.