skills/mobile/android-deploy/SKILL.md
Android: Gradle variants, signing, Google Play Console, Firebase App Distribution, Fastlane, bundletool
npx skillsauth add alphaonedev/openclaw-graph android-deployInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill automates Android app deployment, covering Gradle-based builds, APK/AAB signing, uploads to Google Play Console, distribution via Firebase, and tools like Fastlane and bundletool for streamlined CI/CD.
Use this skill for deploying Android apps in production, testing variants, or automating releases; ideal for CI pipelines, app updates to Google Play, or internal distribution via Firebase; avoid for non-Android projects or basic builds without deployment needs.
To deploy an Android app, first configure build.gradle with variants (e.g., set buildTypes { release { ... } }), then use Fastlane to chain tasks like building, signing, and uploading. For CI integration, invoke Gradle tasks via scripts, pass environment variables for keys, and handle outputs for subsequent steps. Always verify keystore paths and API credentials before running; for example, run a Fastlane lane that calls ./gradlew assembleRelease followed by bundletool extraction.
./gradlew assembleRelease --stacktrace (use --stacktrace for debugging).apksigner sign --ks my.keystore --ks-key-alias myalias myapp.apk (requires keystore file and alias).POST https://www.googleapis.com/androidpublisher/v3/applications/{packageName}/edits with OAuth token from $GOOGLE_PLAY_API_KEY; example curl: curl -H "Authorization: Bearer $GOOGLE_PLAY_API_KEY" -d '{"title": "Edit"}' https://....firebase appdistribution:distribute myapp.apk --app <APP_ID> --groups my-testers (set $FIREBASE_TOKEN for auth).lane :deploy do |options| sh("./gradlew assembleRelease") end; run with fastlane android deploy.bundletool build-apks --bundle=myapp.aab --output=myapp.apks --ks=my.keystore (include --ks-pass for password via env var like $KEYSTORE_PASS).android { buildTypes { release { signingConfig signingConfigs.release } } } (2 lines).response = requests.post('https://www.googleapis.com/androidpublisher/v3/...', headers={'Authorization': f'Bearer {os.environ["GOOGLE_PLAY_API_KEY"]}'} ) (2 lines).Integrate by setting environment variables for sensitive data, e.g., export GOOGLE_PLAY_API_KEY=$SERVICE_API_KEY for OAuth; configure Fastlane with a Fastfile in your project root, including lanes that reference Gradle tasks. For Firebase, add the Firebase CLI and set $FIREBASE_TOKEN via service account JSON. Use bundletool as a JAR in your build pipeline, ensuring it's version-compatible (e.g., 1.14.0+). Link with CI tools like GitHub Actions by adding steps: run: fastlane android deploy in your workflow YAML.
Handle signing errors by checking keystore paths and passwords (e.g., if apksigner fails with "Keystore not found", verify file existence); for API uploads, catch 401 errors by ensuring $GOOGLE_PLAY_API_KEY is valid and not expired. Gradle build failures often stem from variant mismatches—use ./gradlew tasks to list available tasks. For Fastlane, debug with fastlane --verbose; if bundletool reports "Invalid bundle", validate AAB with bundletool validate --bundle=myapp.aab. Always wrap commands in try-catch blocks in scripts, e.g., try { sh("./gradlew assembleRelease") } catch { echo "Build failed: $error" }.
Example 1: Build and Sign an APK for Release
First, ensure build.gradle has: signingConfigs { release { storeFile file("my.keystore") keyAlias "myalias" } }. Then, run: ./gradlew assembleRelease. Finally, sign: apksigner sign --ks my.keystore --ks-key-alias myalias app/build/outputs/apk/release/app-release-unsigned.apk. This produces a signed APK ready for distribution.
Example 2: Upload to Google Play via Fastlane
Create a Fastfile with: lane :upload do upload_to_play_store track: 'internal' apk_path: 'app/build/outputs/apk/release/app-release.apk' end. Set env var: export SUPPLY_JSON_KEY_FILE=$GOOGLE_PLAY_SERVICE_ACCOUNT. Run: fastlane upload. This automates building, signing, and uploading to the internal track on Google Play Console.
tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui