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%. Here's why app size matters more than you think.
Spotify's engineering team built Ruler, a Gradle plugin that traces every byte in your Android app back to its source module or dependency. With 1,000+ modules in their codebase, they needed granular visibility to optimize what users actually download.
Key Takeaways
- Ruler tracks both download size and install size for every file
- Analyzes APKs generated from App Bundles to match real user experience
- Maps files back to 1,000+ Gradle modules and third-party dependencies
- Runs on every PR to catch size regressions before merge
- Spotify reduced app size by 9% in six months using this tool
Critical Insight
Ruler gives Android teams module-level app size visibility, helping Spotify cut 9% from their app while scaling to thousands of contributors.