How to Deploy an Android App to Google Play

Build, sign, and submit to the Play Store from your AI assistant — no Android Studio required.

What you're building

A Kotlin Android app submitted to the Google Play internal test track, with PromptShip handling the Gradle build, APK signing, and Play Store upload automatically.

Prerequisites

No Dockerfile needed. PromptShip detects Android projects automatically and runs ./gradlew assembleRelease in a managed build environment.

Step 1: Create and configure the app

Ask your AI assistant to set up an Android app:

Create an Android app called my-android-app from github.com/me/my-android-app, package name com.example.myapp.
create_app(
  name: "my-android-app",
  github_repo: "github.com/me/my-android-app"
)
configure_app(
  app_name: "my-android-app",
  app_type: "android",
  android_package_name: "com.example.myapp"
)

Step 2: Add a Google Service Account

PromptShip needs API access to upload to Google Play on your behalf.

  1. In Play Console → Setup → API access → link to a Google Cloud project (or create one)
  2. In Google Cloud Console → IAM & Admin → Service Accounts → Create service account
  3. Grant the service account the Service Account User role in Cloud Console
  4. Back in Play Console → Grant the service account the Release manager role
  5. In Cloud Console → Service Accounts → Keys → Create new key → choose JSON → download
  6. Upload the key to PromptShip:
Set the Google service account JSON for my-android-app prod from the file I just downloaded.
set_secret(
  app_name: "my-android-app",
  environment: "prod",
  key: "GOOGLE_SERVICE_ACCOUNT_JSON",
  value: "<contents of the downloaded JSON file>"
)

Step 3: Submit to Google Play

Submit my-android-app to the Play Store internal track from the main branch.
submit_app(
  app_name: "my-android-app",
  environment: "prod",
  branch: "main",
  play_track: "internal"
)

PromptShip will clone your repo, run ./gradlew assembleRelease, sign the APK with a managed keystore, and upload it to the internal test track. Check status anytime:

What's the latest submission status for my-android-app?
get_submit_app_status(app_name: "my-android-app")

Keystore management

PromptShip auto-generates a signing keystore on the first submission and reuses it for all future builds. Download it anytime as a base64-encoded PKCS12:

Download the signing keystore for my-android-app prod.
get_android_keystore(app_name: "my-android-app", environment: "prod")

To use your own keystore, ask your AI to set these secrets before submitting:

Use my own keystore for my-android-app: base64 is <...>, password is <...>, alias is <...>.
set_secret(app_name: "my-android-app", environment: "prod", key: "ANDROID_KEYSTORE_B64", value: "<base64>")
set_secret(app_name: "my-android-app", environment: "prod", key: "ANDROID_KEYSTORE_PASSWORD", value: "<password>")
set_secret(app_name: "my-android-app", environment: "prod", key: "ANDROID_KEYSTORE_KEY_ALIAS", value: "<alias>")

Next steps