android-playstore-setup
npx skills add https://github.com/hitoshura25/claude-devtools --skill android-playstore-setup
Agent 安装分布
Skill 文档
Android Play Store Setup
This skill orchestrates complete Google Play Store deployment setup with automated publishing to the internal testing track using Fastlane.
What This Does
Scope: Internal track deployment only (simplified for quick testing)
Sets up everything needed for automated Play Store deployment using Fastlane:
- Scan Project – Analyze project and generate setup checklist
- Fastlane Setup – Configure Fastlane with supply and screengrab
- App Icon – Generate and place icon assets
- Screenshots – Automated screenshot capture
- Store Listing – Feature graphic and metadata
- Privacy Policy – Generate privacy policy for GitHub Pages
- Version Management – Setup Git tag-based versioning
- Signing Configuration – Configure release signing
- Service Account – Play Store API access
- GitHub Actions – CI/CD workflows with Fastlane
Prerequisites
- Google Play Developer account ($25 one-time)
- Google Cloud Platform account (free)
- Admin access to Play Console
- Package name reserved in Play Console
Workflow Overview
1. Scan â 2. Review â 3. Setup â 4. Deploy
â â â â
ð â
ð§ ð
Process
Step 1: Scan Project (Analysis Only)
Run /devtools:android-playstore-scan
What it does:
- Scans AndroidManifest.xml and build.gradle
- Detects Health Connect, ads, analytics
- Checks for privacy policy
- Generates
PLAY_CONSOLE_SETUP.mdwith pre-filled answers
Output: PLAY_CONSOLE_SETUP.md
Action: Review the generated file and address any warnings
Step 2: Generate Privacy Policy (If Needed)
If PLAY_CONSOLE_SETUP.md shows privacy policy is missing:
Run /devtools:privacy-policy-generate
What it does:
- Scans project for app info
- Detects Health Connect and third-party SDKs
- Prompts for developer info
- Generates
docs/privacy-policy.md - Creates GitHub Pages setup guide
Verify:
test -f docs/privacy-policy.md && echo "â Privacy policy created"
Next: Enable GitHub Pages (Settings â Pages â Source: docs/)
Step 3: Setup Version Management
Run /devtools:version-management with platform=gradle
What it does:
- Creates
scripts/version-manager.sh(core) - Creates
scripts/gradle-version.sh(Android adapter) - Creates
version.propertieswith initial version - Updates
app/build.gradle.ktsto read from version.properties
Verify:
./scripts/version-manager.sh latest
./scripts/gradle-version.sh generate patch
Step 4: Generate Keystores
Run /devtools:android-keystore-generation
What it does:
- Generates production-release.jks (for CI/CD)
- Generates local-dev-release.jks (for local testing)
- Creates KEYSTORE_INFO.txt with credentials
- Updates .gitignore
Verify:
ls keystores/*.jks
cat keystores/KEYSTORE_INFO.txt
Step 5: Configure Signing
Run /devtools:android-signing-config
What it does:
- Adds signing configuration to app/build.gradle.kts
- Configures dual-source credentials (env vars + gradle.properties)
- Updates local ~/.gradle/gradle.properties
- Adds validation for release builds
Verify:
./gradlew assembleRelease
Step 6: Configure ProGuard (If Not Already Setup)
Run /devtools:android-proguard-setup
What it does:
- Creates app/proguard-rules.pro with safe defaults
- Enables minification and resource shrinking
- Adds library-specific rules if needed
Verify:
grep "isMinifyEnabled = true" app/build.gradle.kts
Step 7: Setup Fastlane
Run /devtools:android-fastlane-setup
What it does:
- Creates Gemfile with fastlane and screengrab
- Creates fastlane/Appfile with package name
- Creates fastlane/Fastfile with deployment lanes
- Creates fastlane/Screengrabfile for screenshot automation
- Creates fastlane/metadata/ directory structure
Verify:
bundle exec fastlane --version
bundle exec fastlane lanes
Step 7a: Generate App Icon
Run /devtools:android-app-icon
What it does:
- Analyzes project for app name and colors
- Generates docs/APP_ICON_SETUP.md with IconKitchen instructions
- Provides helper script to process IconKitchen downloads
- Copies mipmap resources and Play Store icon
Verify:
test -f fastlane/metadata/android/en-US/images/icon.png
file fastlane/metadata/android/en-US/images/icon.png | grep "512 x 512"
Step 7b: Setup Screenshot Automation
Run /devtools:android-screenshot-automation
What it does:
- Adds screengrab dependency to app/build.gradle.kts
- Creates debug manifest with required permissions
- Creates ScreenshotTest.kt for automated capture
- Creates DemoModeRule.kt for clean status bar
Verify:
bundle exec fastlane screenshots
ls fastlane/metadata/android/en-US/images/phoneScreenshots/
Step 7c: Create Store Listing Assets
Run /devtools:android-store-listing
What it does:
- Generates docs/STORE_LISTING_GUIDE.md
- Creates metadata templates (title, description, etc.)
- Provides feature graphic generation script
- Guides user through asset creation
Verify:
test -f fastlane/metadata/android/en-US/images/featureGraphic.png
wc -c fastlane/metadata/android/en-US/*.txt
Step 8: Create Deployment Workflows
Run /devtools:android-workflow-internal
What it does:
- Creates .github/workflows/build.yml (CI only – runs on push/PR)
- Creates .github/workflows/release-internal.yml (Manual releases with Fastlane)
- Adds Ruby setup and bundle caching
- Uses
bundle exec fastlane deploy_internalfor deployment - All actions pinned to SHAs
Verify:
test -f .github/workflows/build.yml
test -f .github/workflows/release-internal.yml
grep "bundle exec fastlane" .github/workflows/release-internal.yml
Step 9: Service Account Setup
Run /devtools:android-service-account-guide
What it does:
- Provides step-by-step guide for Google Cloud setup
- Documents service account creation
- Creates Play Console setup documentation
Manual steps required:
- Create service account in Google Cloud
- Download JSON key
- Grant permissions in Play Console
- Add JSON to GitHub Secrets as
SERVICE_ACCOUNT_JSON_PLAINTEXT
Step 10: Add Keystore to GitHub Secrets
From keystores/KEYSTORE_INFO.txt, add these secrets to GitHub:
# From KEYSTORE_INFO.txt, copy the base64 encoded keystore:
SIGNING_KEY_STORE_BASE64: <base64_string>
SIGNING_KEY_ALIAS: upload
SIGNING_STORE_PASSWORD: <password>
SIGNING_KEY_PASSWORD: <password>
Step 11: Validate API Connection
Run /devtools:android-playstore-api-validation
What it does:
- Creates scripts/validate-playstore.py
- Tests Play Store API connection
- Verifies service account permissions
Verify:
python3 -m venv .venv
source .venv/bin/activate
pip install google-auth google-api-python-client
python3 scripts/validate-playstore.py /path/to/service-account.json com.example.app
Step 12: First Manual Upload (CRITICAL)
â ï¸ Before GitHub Actions can deploy, you MUST manually upload your first release.
Why?
- Google Play requires manual first upload to complete store listing
- Your production keystore becomes the upload key
- Play App Signing is automatically enabled
Steps:
# 1. Build release bundle locally
./gradlew bundleRelease
# 2. Verify it's signed
jarsigner -verify -verbose app/build/outputs/bundle/release/app-release.aab
# 3. Manual upload via Play Console
In Play Console:
- Go to Release â Internal testing
- Click Create new release
- Upload
app-release.aab - Complete store listing (title, description, icon)
- Complete app content declarations
- Publish to internal testing
IMPORTANT: The keystore used for this first upload must be the same one configured in GitHub Secrets!
Step 13: Test Fastlane Deployment
After first manual upload is complete:
# Push to main branch to trigger deployment
git add .
git commit -m "Setup Play Store deployment"
git push origin main
What happens:
- GitHub Actions workflow triggers
- Runs unit tests
- Builds release bundle
- Deploys to internal testing track
Monitor: Go to repository â Actions tab
Understanding Play App Signing
Two Keys System
| Key Type | Purpose | Holder | Can Reset? |
|---|---|---|---|
| App Signing Key | Signs APKs for users | No (permanent) | |
| Upload Key | Authenticates your uploads | You | Yes (via Play Console) |
Automatic Setup
For apps created after August 2021, Play App Signing is automatic:
- First upload: Google generates app signing key
- Your production keystore = upload key
- Google re-signs with app signing key before distribution
No action needed – it just works!
Final Verification Checklist
# Project files
â Fastlane configured (Gemfile, Fastfile, Appfile)
â Version management scripts in scripts/
â Keystores in keystores/ (gitignored)
â Privacy policy in docs/privacy-policy.md
â Metadata in fastlane/metadata/android/en-US/
â CI workflow in .github/workflows/build.yml
â Release workflow in .github/workflows/release-internal.yml
# Build verification
â ./gradlew assembleRelease succeeds
â Unit tests pass
â ProGuard enabled
# GitHub Secrets configured
â SERVICE_ACCOUNT_JSON_PLAINTEXT
â SIGNING_KEY_STORE_BASE64
â SIGNING_KEY_ALIAS
â SIGNING_STORE_PASSWORD
â SIGNING_KEY_PASSWORD
# Play Console
â First manual upload completed
â Internal testing track active
â Service account has permissions
# API validation
â scripts/validate-playstore.py passes
Next Steps
For Beta/Production Deployment
Once internal testing is working:
# Add beta track
/devtools:android-workflow-beta
# Add production track
/devtools:android-workflow-production
Track Information
| Track | Audience | Review Time | Use Case |
|---|---|---|---|
| Internal | Up to 100 testers | Instant | Quick testing, no review |
| Closed (Alpha) | Invited testers | < 24h | Beta testing |
| Open (Beta) | Anyone can join | < 24h | Public beta |
| Production | All users | 1-7 days | Full release |
Troubleshooting
“Package not found” in API validation
- Ensure app exists in Play Console
- Verify package name matches exactly
- Complete first manual upload
“Upload key mismatch”
- Your first upload keystore â GitHub Secrets keystore
- Fix: Use Play Console â App signing â Request upload key reset
- Re-upload with correct keystore
“Permission denied” for service account
- Grant “Release to production” permission in Play Console
- Wait 5-10 minutes for permissions to propagate
GitHub Actions fails to deploy
- Verify all GitHub Secrets are set correctly
- Check workflow logs for specific error
- Ensure first manual upload was completed
Summary
You’ve successfully setup:
- â Privacy policy (GitHub Pages ready)
- â Version management (Git tag-based)
- â Release signing (production + local dev)
- â Fastlane deployment automation
- â GitHub Actions CI/CD (internal track)
- â Play Store API connection
Your app is now ready for continuous integration and deployment!
Every push to main or PR â Automatic build & test (CI) â Manual workflow trigger â Version management + deployment to internal track ð
All checks must pass before marking this skill as complete.
Completion Criteria
Do NOT mark complete unless ALL are verified:
â Service Account Setup
- Service account created in Google Cloud
- JSON key downloaded and stored securely
- Play Developer API enabled
- Service account linked to Play Console
- “Release” permission granted
â Store Metadata Structure
- fastlane/metadata/android/en-US/ directory exists
- At least en-US locale configured
- Metadata files created (title, description, changelogs)
- docs/PLAY_STORE_TRACKS.md documentation created
â API Validation
- scripts/validate-playstore.py exists
- Validation script runs successfully
- API connection confirmed
- Package access confirmed
â Documentation
- PLAY_CONSOLE_SETUP.md exists (project root)
- GITHUB_SECRETS.md exists (if needed)
Summary Report
After completion, provide this summary:
â
Android Play Store Setup Complete!
ð Service Account:
â Created in Google Cloud
â JSON key downloaded
â Linked to Play Console
â Permissions granted
ð Store Metadata:
â Structure created: fastlane/metadata/android/en-US/
â Locales configured
â Templates ready
â
API Validation:
â Validation script created
â API connection tested
â Package access confirmed
ð Next Steps:
For GitHub:
1. Add secrets (see GITHUB_SECRETS.md if it exists)
2. Create "production" environment with reviewers
For Deployment:
1. Run: /devtools:android-playstore-publish
2. Generate deployment workflows
â ï¸ CRITICAL REMINDERS:
- NEVER commit service account JSON to git
- Store JSON key in password manager
- Add all 5 secrets to GitHub before deploying
- Wait 5-10 minutes after granting permissions
Integration with Other Skills
This skill is prerequisite for:
android-playstore-publishing– Uses service account for deploymentandroid-playstore-pipeline– Complete pipeline setup
Troubleshooting
If any skill fails:
- Fix the specific issue in that skill
- Re-run that skill until it completes
- Continue with remaining skills
- Run final verification
Common issues:
- Service account not found â Check Google Cloud project
- Permissions denied â Grant “Release” permission
- API validation fails â Wait 5-10 minutes for propagation