Skip to content

Play Store Deployment

Guide for deploying to Google Play Store.

Prerequisites

  • Google Play Console access
  • Service account JSON key
  • Fastlane installed

Setup

1. Service Account

  1. Create service account in Google Cloud Console
  2. Grant access in Play Console
  3. Download JSON key file

2. Environment Variables

GOOGLE_PLAY_JSON_KEY_PATH=/path/to/key.json

Deployment Commands

Internal Testing

Terminal window
fastlane android internal

Beta (Open Testing)

Terminal window
fastlane android beta

Production

Terminal window
fastlane android release

Fastlane Configuration

android/fastlane/Fastfile:

platform :android do
desc "Deploy to internal testing track"
lane :internal do
gradle(task: "clean bundleRelease")
upload_to_play_store(
track: "internal",
aab: "../build/app/outputs/bundle/release/app-release.aab"
)
end
desc "Deploy to beta track"
lane :beta do
gradle(task: "clean bundleRelease")
upload_to_play_store(
track: "beta",
aab: "../build/app/outputs/bundle/release/app-release.aab"
)
end
desc "Deploy to production"
lane :release do
gradle(task: "clean bundleRelease")
upload_to_play_store(
track: "production",
rollout: "0.1", # 10% staged rollout
aab: "../build/app/outputs/bundle/release/app-release.aab"
)
end
end

Play Store Metadata

Located in android/fastlane/metadata/android/:

metadata/android/
├── en-US/
│ ├── title.txt
│ ├── short_description.txt
│ ├── full_description.txt
│ └── changelogs/
│ └── default.txt
└── images/
├── phoneScreenshots/
└── featureGraphic.png

Staged Rollout

Increase rollout percentage:

Terminal window
fastlane android promote rollout:0.5 # 50%
fastlane android promote rollout:1.0 # 100%

Common Issues

Version Code Conflicts

Version code must always increase. Check current:

Terminal window
fastlane run google_play_track_version_codes track:production

AAB vs APK

Play Store requires AAB (Android App Bundle). Ensure you’re building:

Terminal window
flutter build appbundle --release