Skill detail

android-release-build-setup

Android release-build configuration specialty only.

MatchPossibleReviewed for android development
Sourcehitoshura25/claude-devtoolsExternal source
Reported installs14Popularity signal only

Inspect before use

Automated review checks relevance, not safety or endorsement. Read the source instructions before using this skill.

Saved source preview

SKILL.md

The saved excerpt is a snapshot from review. The external source remains the complete and most current version.

---
name: android-release-build-setup
description: Complete Android release build configuration - orchestrates keystore, ProGuard, and signing setup
category: android
version: 2.0.0
---

# Android Release Build Setup

This skill orchestrates complete Android release build configuration by running three atomic skills in sequence.

## What This Does

Sets up everything needed for Android release builds:
1. **Keystore Generation** - Production and local dev keystores
2. **ProGuard/R8 Configuration** - Code minification and optimization
3. **Signing Configuration** - Dual-source signing (CI/CD + local dev)

## Prerequisites

- Android project with Gradle
- JDK installed (for keytool command)
- Project uses Kotlin DSL (build.gradle.kts)

## Process

This skill runs three sub-skills in order:

### Step 1: Generate Keystores

Follow the skill at: `~/claude-devtools/skills/android-keystore-generation/SKILL.md`

**What it does:**
- Creates production keystore (for CI/CD only)
- Creates local development keystore
- Generates KEYSTORE_INFO.txt with credentials
- Updates .gitignore

**Verify before continuing:**
```bash
ls keystores/*.jks
cat keystores/KEYSTORE_INFO.txt
```

---

### Step 2: Configure ProGuard/R8

Follow the skill at: `~/claude-devtools/skills/android-proguard-setup/SKILL.md`

**What it does:**
- Creates proguard-rules.pro with safe defaults
- Enables minification in build.gradle.kts
- Enables resource shrinking

**Verify before continuing:**
```bash
test -f app/proguard-rules.pro
grep "isMinifyEnabled = true" app/build.gradle.kts
```

---

### Step 3: Configure Signing

Follow the skill at: `~/claude-devtools/skills/android-signing-config/SKILL.md`

**What it does:**
- Adds signingConfigs to build.gradle.kts
- Creates gradle.properties.template
- Configures ~/.gradle/gradle.properties (with permission)
- Adds validation for missing signing config

**Verify before continuing:**
```bash
./gradlew assembleRelease
jarsigner -verify app/build/outputs/apk/release/app-release.apk
```

---

## Final Verification (MANDATORY)

After all three skills complete, verify the complete setup:

```bash
# 1. Clean build
./gradlew clean

# 2. Build release APK
./gradlew assembleRelease

# 3. Verify APK exists
ls -lh app/build/outputs/apk/release/app-release.apk

# 4. Verify ProGuard mapping generated
ls -lh app/build/outputs/mapping/release/mapping.txt

# 5. Verify signing
jarsigner -verify -verbose -certs app/build/outputs/apk/release/app-release.apk
```

**All checks must pass** before marking this skill as complete.

## Completion Criteria

Do NOT mark complete unless ALL are verified:

✅ **Keystores generated and secured**
  - [ ] production-release.jks exists in keystores/
  - [ ] local-dev-release.jks exists in keystores/
  - [ ] KEYSTORE_INFO.txt created with passwords
  - [ ] keystores/ added to .gitignore

✅ **ProGuard configured**
  - [ ] proguard-rules.pro exists with safe defaults
  - [ ] isMinifyEnabled = true in build.gradle.kts
  - [ ] isShrinkResources = true in build.gradle.kts

✅ **Signing configured**
  - [ ] signingConfigs.release exists in build.gradle.kts
  - [ ] Release buildType uses signingConfig
  - [ ] gradle.properties configured (local) OR environment variables set (CI)

✅ **MANDATORY: Build verification**
  - [ ] `./gradlew assembleDebug` succeeds
  - [ ] `./gradlew assembleRelease` succeeds
  - [ ] app/build/outputs/apk/release/app-release.apk exists
  - [ ] app/build/outputs/mapping/release/mapping.txt exists
  - [ ] `jarsigner -verify` confirms APK is signed correctly

## Summary Report

After completion, provide this summary:

```
✅ Android Release Build Setup Complete!

📦 Keystores Generated:
  Production: keystores/production-release.jks (CI/CD only)
  Local Dev: keystores/local-dev-release.jks (local testing)
  Credentials: keystores/KEYSTORE_INFO.txt

🔒 ProGuard/R8 Configuration:
  ✓ Minification enabled
  ✓ Resource shrinking enabled
  ✓ Safe default rules: app/proguard-rules.pro

⚙️  Build Configura
Read the full source on GitHub (opens external page)
Context

Related work