android-ci-cd-expert
Skill11 starsChanged 8 months agoMITView on GitHub
Use when setting up continuous integration/deployment (GitHub Actions), Gradle Play Publisher, Fastlane, or R8 Proguard rules for Release builds.
- Reads credentials
In this repository40 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- android-accessibilitySkill
- android-adaptive-layoutsSkill
- android-adb-terminalSkill
- android-background-executionSkill
- android-bluetooth-bleSkill
- android-build-verificationSkill
- android-camerax-mlkitSkill
- android-clean-architectureSkill
- android-code-review-expertSkill
- android-coroutines-expertSkill
- android-custom-drawing-canvasSkill
- android-design-system-m3Skill
- android-design-to-codeSkill
- android-detekt-expertSkill
- android-enterprise-securitySkill
- android-gemini-nanoSkill
- android-google-workspace-expertSkill
- android-gradle-expertSkill
- android-hardware-testingSkill
- android-jetpack-composeSkill
- android-kmp-compose-uiSkill
- android-kmp-platform-channelsSkill
- android-kmp-sharedSkill
- android-ktlint-formattingSkill
- android-lint-and-qualitySkill
- android-local-stt-ttsSkill
- android-location-mapsSkill
- android-macrobenchmarkSkill
- android-media3-exoplayerSkill
- android-media-and-image-expertSkill
- android-motion-animationsSkill
- android-navigation-expertSkill
- android-offline-firstSkill
- android-performance-auditSkill
- android-rag-localSkill
- android-screenshot-testingSkill
- android-security-hardenedSkill
- android-unit-testingSkill
- android-wear-os-composeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 3 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 34
Data Models: If using a local DB (Room) or Network API (Retrofit), you MUST add @Keep annotations to your Domain Models / DTOs, or add …
- Very specific: line 35
JNI / C++: If using NDK, you must keep native methods using -keepclasseswithmembernames class * { native <methods>.
- Very specific: line 36
Empty Projects: When scaffolding an empty project intended for production, you must NEVER leave proguard-rules.pro completely blank.
- Very specific: line 41
When generating .github/workflows/android.yml, adhere to the following Senior Architect standards:
- Very specific: line 44
Base OS: Use ubuntu-latest.
- Very specific: line 45
Java Setup: Use actions/setup-java@v4 with distribution: 'zulu' and java-version: '17' (or 21 for latest AGP).
- Very specific: line 46
Gradle Caching: ALWAYS use gradle/actions/setup-gradle@v3 to cache dependencies and speed up CI drastically.
- Very specific: line 47
Verification: Run ./gradlew lintDebug ktlintCheck testDebugUnitTest sequentially.
- Distinctive: line 50
When generating a release workflow, never hardcode passwords.
- Distinctive: line 72
Prefer Gradle Play Publisher (GPP) if you only need Play Store automation without iOS overhead.
- Very specific: line 73
If using Fastlane, store the play-store-credentials.json via GitHub secrets and inject it securely.
- Very specific: line 77
Committing Keystores: NEVER commit .jks files directly to Git.
- Very specific: line 78
Downloading SDKs manually: Never manually fetch tools_r25...zip.
- Distinctive: line 79
Matrix Builds Overkill: Do not use matrix builds on every PR for multiple API levels unless explicitly maintaining a fundamental Library.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Android CI/CD & Release Architect 🚀🤖
A masterclass framework for configuring flawless Android CI/CD pipelines, automating Play Store releases, and safely applying R8 obfuscation without breaking reflection.
⚡ When to Use
- GitHub Actions: Setting up
pull_requestchecks orpushrelease workflows. - R8 / ProGuard: Configuring rules to shrink, obfuscate, and optimize the release APK/AAB.
- Signing Keystores: Safely extracting and using Base64 Keystore secrets in CI.
- Fastlane / Gradle Play Publisher: Automating deployments to Google Play Console.
🛡️ R8 Obfuscation & ProGuard Rules (Critical)
R8 is enabled by default in release builds (isMinifyEnabled = true). It strips unused code and renames classes to single letters, which will crash your app if you use Reflection or JSON serialization (like Gson/Moshi) without proper rules.
The Architect's Checklist for R8:
- Data Models: If using a local DB (Room) or Network API (Retrofit), you MUST add
@Keepannotations to your Domain Models / DTOs, or add-keep class com.example.model.** { *; }toproguard-rules.pro. - JNI / C++: If using NDK, you must keep native methods using
-keepclasseswithmembernames class * { native <methods>; }. - Empty Projects: When scaffolding an empty project intended for production, you must NEVER leave
proguard-rules.procompletely blank. At minimum, scaffold standard safeguards for Android endpoints. - Testing R8: Advise the user to test the release build using
./gradlew installRelease(rather than just debug) before shipping.
🤖 GitHub Actions Pipeline Excellence
When generating .github/workflows/android.yml, adhere to the following Senior Architect standards:
1. Build & Test (PRs)
- Base OS: Use
ubuntu-latest. - Java Setup: Use
actions/setup-java@v4withdistribution: 'zulu'andjava-version: '17'(or 21 for latest AGP). - Gradle Caching: ALWAYS use
gradle/actions/setup-gradle@v3to cache dependencies and speed up CI drastically. - Verification: Run
./gradlew lintDebug ktlintCheck testDebugUnitTestsequentially.
2. Signing & Release
When generating a release workflow, never hardcode passwords. Ensure these environment variables are documented for the user to add to GitHub Secrets:
KEYSTORE_BASE64SIGNING_KEY_ALIASSIGNING_KEY_PASSWORDSIGNING_STORE_PASSWORD
3. Example Release Snippet
- name: Decode Keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > app/keystore.jks
- name: Build Release AAB
run: ./gradlew bundleRelease
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}🏎️ Fastlane & Deployment
- Prefer Gradle Play Publisher (GPP) if you only need Play Store automation without iOS overhead.
- If using Fastlane, store the
play-store-credentials.jsonvia GitHub secrets and inject it securely. - Automate track progression (Internal -> Alpha -> Beta -> Production).
🛑 CI/CD Anti-Patterns to Avoid
- Committing Keystores: NEVER commit
.jksfiles directly to Git. - Downloading SDKs manually: Never manually fetch
tools_r25...zip. Usesetup-androidor standard standard runners which come pre-installed with the SDK. - Matrix Builds Overkill: Do not use matrix builds on every PR for multiple API levels unless explicitly maintaining a fundamental Library. App tests should just run standard local unit tests on PRs to save CI minutes.
🔗 Related Resources
- Build Verification Skill
- Code Review Expert (For PR triggers)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

