android-build-conventionslisted
Install: claude install-skill eric-sabe/engsys
# Android Build Conventions
Configure, maintain, and verify Android builds with Gradle's Kotlin DSL targeting
AGP 8.x+ and Gradle 8.x+. Use the version catalog as the single source of truth
for dependencies, keep build logic declarative, and **always run the local gate**
before reporting an Android change complete — Android typically has no cloud CI
for the app build, so the local `./gradlew` run is the gate.
## Contents
- [Local Build / Verify Gate](#local-build--verify-gate)
- [Kotlin DSL Conventions](#kotlin-dsl-conventions)
- [Version Catalogs](#version-catalogs)
- [Build Types and Product Flavors](#build-types-and-product-flavors)
- [R8 / ProGuard](#r8--proguard)
- [Signing](#signing)
- [Convention Plugins](#convention-plugins)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
## Local Build / Verify Gate
Run these before reporting any Android change complete. They are fast, local, and
the de-facto gate (there is no cloud CI for the app build):
```
./gradlew assembleDebug # compile + package the debug APK
./gradlew testDebugUnitTest # run JVM unit tests (src/test)
./gradlew lintDebug # Android Lint static analysis
```
Naturalize the module if the app isn't the root project (e.g.
`./gradlew :app:assembleDebug`). The `pre-push-gradle.sh` hook in this pack runs
this gate automatically when Android files change on push — **do not bypass it
with `--no-verify`.**
Notes:
- Use the project's `./gradlew` wrapper, never a gl