← ClaudeAtlas

android-build-conventionslisted

Configure and verify Android Gradle builds: Kotlin DSL (build.gradle.kts), version catalogs (libs.versions.toml), build types and product flavors, R8/ProGuard shrinking and keep rules, signing configs, and the local build/verify gate (./gradlew assembleDebug, testDebugUnitTest, lintDebug). Use when editing Gradle build files, adding dependencies, setting up flavors/variants, configuring minification or signing, or running the Android build/test/lint gate before reporting a change complete.
eric-sabe/engsys · ★ 1 · AI & Automation · score 67
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