Microsoft Praveen Pendyala Feb 2, 2021

Measuring Android App Size in CI

Article Summary

Microsoft SwiftKey's team knows that reducing app size once isn't enough. The real challenge? Keeping it small with every code change.

The Microsoft Mobile Engineering team built an open-source CI extension that automatically measures Android app size changes on every pull request. It works with both GitHub Actions and Azure DevOps pipelines.

Key Takeaways

Critical Insight

The extension prevents app bloat by catching size regressions before they reach production, making size monitoring a standard part of code review.

The tool reveals why install size is always larger than APK size, and tracks the specific culprits behind app bloat.

About This Article

Problem

App size at Microsoft SwiftKey kept creeping up over time. Without regular checks, code changes would gradually make the app bigger, which hurt how many people downloaded it and came back to use it.

Solution

Praveen Pendyala's team built an open-source CI extension for GitHub Actions and Azure DevOps. It automatically tracks app size changes across five metrics on every pull request: APK size, install size, dex files, ARSC resources, and native libraries.

Impact

The extension posts a markdown summary of size changes to each PR so developers can spot problems before shipping to production. This keeps app size discipline built into code review on Windows, Linux, and Mac CI runners.