MobDev.GooglePlay (mob_dev v0.5.9)

Copy Markdown View Source

Google Play Developer API client for uploading Android App Bundles.

Authenticates using a service account JSON key (RSA JWT → OAuth2 access token), then drives the Play edit workflow: create edit → upload .aab → assign track → commit

Service account setup (one-time)

  1. Go to Play Console → Setup → API access → link to a Google Cloud project.
  2. In Google Cloud Console → IAM → Service Accounts → Create a service account.
  3. Download the JSON key for that service account.
  4. Back in Play Console → Setup → API access → grant the service account "Release manager" (or "Admin") permission.

mob.exs config

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

Summary

Functions

Uploads aab_path to Google Play and assigns it to track.

Functions

upload(aab_path, opts)

@spec upload(
  Path.t(),
  keyword()
) :: {:ok, integer()} | {:error, String.t()}

Uploads aab_path to Google Play and assigns it to track.

Options (all required unless noted):

  • :service_account_json — path to the service account JSON key file
  • :package_name — Android applicationId (e.g. "com.beyondagronomy.aircartmax")
  • :track — "internal" | "alpha" | "beta" | "production" (default: "internal")

Returns {:ok, version_code} or {:error, reason}.