# `mix dala.publish.android`
[🔗](https://github.com/manhvu/dala_dev/blob/main/lib/mix/tasks/dala.publish.android.ex#L1)

Uploads a release-signed `.aab` to Google Play Console using the Google Play
Developer API.

    mix dala.publish.android                       # uploads the default AAB
    mix dala.publish.android path/to/app.aab       # uploads a specific AAB
    mix dala.publish.android --track internal      # upload to Internal track
    mix dala.publish.android --track alpha         # upload to Alpha track

## Prerequisites

  1. Google Play Developer account with API access enabled
  2. Service Account JSON key file with "Release Manager" or "Project Manager" role
  3. `dala.exs` configured:

         config :dala_dev,
           google_play: [
             service_account_json: "~/.google-play/service-account.json",
             package_name: "com.example.myapp",
             track: "internal"  # internal | alpha | beta | production
           ]

## Tracks

  * `internal` - Internal testing (up to 100 testers)
  * `alpha` - Alpha testing (closed track)
  * `beta` - Beta testing (open track)
  * `production` - Live production release

## What it does

  1. Validates the service account JSON and package name
  2. Reads the AAB file
  3. Uploads to Google Play Developer API
  4. Creates a new release on the specified track
  5. Prints the release URL in Google Play Console

## Setup

### 1. Create a Service Account

- Go to [Google Cloud Console](https://console.cloud.google.com)
- Create a project or select existing
- Enable "Google Play Developer API"
- Create a Service Account with "Editor" role
- Generate a JSON key and download it

### 2. Link Service Account to Google Play

- Go to [Google Play Console](https://play.google.com/console)
- Settings → Developer Account → API Access
- Link your Google Cloud project
- Grant access to the service account (Release Manager role)

### 3. Configure dala.exs

Add the configuration shown in Prerequisites section.

## Notes

The upload may take several minutes depending on AAB size and network speed.
Google Play will process the release and you'll receive an email when it's ready.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
