# android/gradle-recipes

Ready-to-use recipes for common build customizations that showcase the Android Gradle plugin's public APIs and DSL.

Repository: https://github.com/android/gradle-recipes
Canonical: https://ross.abutalabs.com/products/gradle-recipes
Language: Kotlin
License Family: other
Last push: 2026-08-10T08:58:41+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 35, longevity 100
- inputs: {"age_days": 2319, "days_push": 23, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2362, forks 260 (observed 2026-08-28T04:06:40.992673+00:00)

## What it is
A collection of ready-to-use recipe projects maintained by Google that demonstrate the Android Gradle Plugin's public APIs and DSL for common build customizations. Each recipe is a minimal working example (artifact transforms, variant handling, generated sources, manifest edits), with dedicated branches matching specific AGP versions.

## Use cases
- customize android builds with the gradle plugin api
- transform classes or manifest during an android gradle build
- add a generated source folder with agp
- create a custom build type using the agp dsl
- android gradle plugin variant api examples
- disable or select variants with beforeVariants
- migrate legacy gradle tasks to the agp artifact api

## When to choose
- You're extending the Android Gradle Plugin and need working sample code for a specific API like artifact transformation or variant customization
- You want examples that match an exact AGP version by switching to its agp-* branch
- You're migrating build logic from legacy task bridging to AGP's components/variant APIs

## When to avoid
- You need a production-ready plugin or library to drop into your build rather than example code
- You're looking for general Gradle build tutorials that don't involve Android
- You need reference documentation of AGP APIs instead of runnable demonstrations, or you require a permissively licensed codebase, since no license is declared in the repo metadata

## Facets
- artifact type: learning-resource
- maturity: active
- function: build-tool, sdk, developer-tools, plugin-system
- domain: mobile-development, developer-tools, tutorials
- platform: jvm, cli
- tags: android-gradle-plugin, agp, gradle, sample-code, build-customization, variant-api, artifact-api, dsl, kotlin, google-maintained, license-unspecified, android, mobile

## Member repositories
- android/gradle-recipes (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:40.992673+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-30T02:36:03.377271+00:00, confidence not recorded.
  - readme: https://github.com/android/gradle-recipes (fetched 2026-08-28T04:06:40.992673+00:00, sha 316638523812)
- Data as of 2026-08-30T08:39:29.467469+00:00.
