# spotify/ruler

Gradle plugin which helps you analyze the size of your Android apps.

Repository: https://github.com/spotify/ruler
Canonical: https://ross.abutalabs.com/products/spotify-ruler
Language: Kotlin
License: Apache-2.0
License Family: permissive
Topics: android, gradle
Last push: 2025-01-27T15:03:31+00:00

## Health v2 (maintenance only)
Score: 24/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 3, release rhythm 8, longevity 100
- inputs: {"age_days": 1862, "days_push": 583, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1220, forks 61 (observed 2026-08-28T04:04:01.819636+00:00)

## What it is
Ruler is a Gradle plugin from Spotify that analyzes the size of Android apps, breaking down how much each module and dependency contributes to total download and install size. It generates HTML and JSON reports and can optionally fail the build if size thresholds are exceeded.

## Use cases
- analyze what contributes to my android app size
- find which gradle modules or dependencies make my apk large
- track app download size growth across builds
- enforce an app size budget in ci
- generate an app size breakdown report for an android bundle
- attribute apk size to third-party libraries

## When to choose
- you build Android apps with Gradle and want per-module and per-dependency size attribution
- you want automated size verification with thresholds in your build pipeline
- you need HTML or JSON size reports for app bundles and APKs

## When to avoid
- you need size analysis for iOS, desktop, or non-Gradle Android builds
- you want runtime performance profiling rather than app size analysis
- your project does not use the Android Gradle Plugin

## Facets
- artifact type: plugin
- maturity: active
- function: build-tool, developer-tools, analytics
- domain: android-tools, mobile-development, developer-tools, analytics
- platform: jvm, cli
- tags: gradle-plugin, app-size-analysis, apk-size, android-app-bundle, size-reporting, android

## Member repositories
- spotify/ruler (main) score 24

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:01.819636+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:16:10.462809+00:00, confidence not recorded.
  - readme: https://github.com/spotify/ruler (fetched 2026-08-28T04:04:01.819636+00:00, sha 422678ac16ee)
- Data as of 2026-08-30T08:39:29.467469+00:00.
