gradle-play-publisher is a free, open source publishing project written in Kotlin and released under MIT. It has 4,317 GitHub stars, 349 forks and 22 open issues, and was last pushed 22 days ago. On this registry it ranks #16 of 46 tracked projects in Publishing, with 5 head-to-head comparisons available. It gained 1 stars over the last 3 tracked days.

What is gradle-play-publisher?

What it is

Gradle Play Publisher is an unofficial release automation Gradle plugin for Android applications. It connects Gradle tasks to the Google Play Developer API through a service account. The plugin is written in Kotlin and distributed under the MIT license.

The project reduces manual Play Store release work. Teams can define artifact uploads, promotions, and metadata publishing as Gradle tasks. GPP can build, upload, and promote App Bundles or APKs, and it can publish listings and other metadata. The README states that the first APK or App Bundle must still be uploaded through the Play Console because registering the app cannot be done using the Play Developer API.

Key capabilities

  • GPP builds, uploads, and promotes App Bundles and APKs through Gradle tasks.
  • It publishes Play Store listings and metadata from files organized in a directory structure.
  • It publishes in-app products and in-app subscriptions.
  • It supports internal sharing artifact uploads and promotion workflows.
  • It works with product flavors, including disabling publishing and combining artifacts into a single release.
  • It supports multiple service accounts and version conflict handling.
  • It provides CLI options and HTTPS proxy support.

Who uses it and how

  • Android teams use GPP to move release artifacts from Gradle builds to Google Play without manual Console uploads.
  • Release engineers use it to promote uploaded artifacts and manage internal sharing artifacts.
  • Publishing teams use it to publish listings, metadata, in-app products, and subscriptions from files.
  • Projects with multiple flavors use it to disable publishing, combine artifacts, or use multiple service accounts.
  • Teams with HTTPS proxies or command-line workflows use it for advanced release environments.

Getting started

Users add and apply the Gradle plugin, configure a valid signing configuration, create a Google Cloud service account with the AndroidPublisher API enabled, and provide its JSON credentials to GPP. The first APK or App Bundle must be uploaded through the Google Play Console before GPP can manage later uploads and changes.

When to use it — and when not to

GPP suits Android teams that want Gradle-native Play Store automation for artifacts, metadata, in-app products, and subscriptions. It is less suitable when teams need actively triaged issue support, because the README describes the project as being in maintenance mode and says issues are ignored while pull requests are accepted. Teams must still operate the Play Console for initial app registration and manage signing, service-account permissions, and Gradle configuration.

project readme (upstream, from github) — read inline

Gradle Play Publisher

Gradle Play Publisher (GPP) is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.

Project status: maintenance mode

Issues are ignored, but pull requests are not. If you need to get something done, submit a PR!

Table of contents

  1. Quickstart guide
  2. Prerequisites
    1. Initial Play Store upload
    2. Signing configuration
    3. Service Account
  3. Basic setup
    1. Installation
    2. Authenticating Gradle Play Publisher
  4. Task organization
  5. Managing artifacts
    1. Common configuration
    2. Publishing an App Bundle
    3. Publishing APKs
    4. Uploading an Internal Sharing artifact
    5. Promoting artifacts
    6. Handling version conflicts
  6. Managing Play Store metadata
    1. Quickstart
    2. Directory structure
    3. Publishing listings
    4. Publishing in-app products
    5. Publishing in-app subscriptions
  7. Working with product flavors
    1. Disabling publishing
    2. Combining artifacts into a single release
    3. Using multiple Service Accounts
  8. Advanced topics
    1. Using CLI options
    2. Using HTTPS proxies

Quickstart guide

  1. Upload the first version of your APK or App Bundle using the Google Play Console
  2. Create a Google Play Service Account
  3. Sign your release builds with a valid signingConfig
  4. Add and apply the plugin
  5. Authenticate GPP

Prerequisites

Initial Play Store upload

The first APK or App Bundle needs to be uploaded via the Google Play Console because registering the app with the Play Store cannot be done using the Play Developer API. For all subsequent uploads and changes, GPP may be used.

Signing configuration

To successfully upload apps to the Play Store, they must be signed with your developer key. Make sure you have a valid signing configuration.

Service Account

To use GPP, you must create a service account with access to the Play Developer API:

  1. If you don't already have one, create a GCP project for your app(s)
  2. Enable the AndroidPublisher API for that GCP project
  3. Create a service account and key
    1. Make sure you're in the GCP project you used above (check the project query param in the URL)
    2. Select New service account
    3. Give it a name and the Project Owner role (don't worry, we'll remove this later)
    4. After creating the service account, find it in the list of all service accounts and use the 3 dots menu to Manage keys
    5. From there, create a new key using the Add key menu (leave JSON selected)
  4. Move the downloaded JSON credentials into your project and tell GPP about it
  5. Give your service account permissions to publish apps on your behalf
    1. Click Invite new user
    2. Copy/paste the service account email (you can find it in the JSON credentials)
    3. Don't touch the roles
    4. Specify which apps the service account should have access to. In this example, GPP has full access to testing tracks and app listings, but will be unable to make production releases:
6. Run `./gradlew bootstrapListing` or some other GPP task to validate your setup 7. Now that you've successfully created the connection between GCP and Google Play, you can remove the Project Owner permissions 1. Go to your [IAM settings](https://console.cloud.google.com/iam-admin/iam) 2. Search for the service account you created 3. Click the edit icon (found at the end of the row) 4. In the permission selection panel that opens, click the trash icon to remove the owner role 5. Click save

Basic setup

Installation

Apply the plugin to each individual com.android.application module where you want to use GPP through the plugins {} DSL:

Kotlin
plugins {
    id("com.android.application")
    id("com.github.triplet.play") version "4.1.1"
}
Groovy
plugins {
    id 'com.android.application'
    id 'com.github.triplet.play' version '4.1.1'
}
Snapshot builds

If you're prepared to cut yourself on the bleeding edge of GPP development, snapshot builds are available from Sonatype's snapshots repository:

Kotlin
buildscript {
    repositories {
        // ...
        maven("https://oss.sonatype.org/content/repositories/snapshots")
    }

    dependencies {
        // ...
        classpath("com.github.triplet.gradle:play-publisher:5.0.0-SNAPSHOT")
    }
}
Groovy
buildscript {
    repositories {
        // ...
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
    }

    dependencies {
        // ...
        classpath 'com.github.triplet.gradle:play-publisher:5.0.0-SNAPSHOT'
    }
}

Authenticating Gradle Play Publisher

After you've gone through the Service Account setup, you should have a JSON file with your private key. Add a play block alongside your android one with the file's location:

android { ... }

play {
    serviceAccountCredentials.set(file("your-key.json"))
}

Note: If you commit unencrypted Service Account keys to source, you run the risk of letting anyone access your Google Play account. To circumvent this issue, put the contents of your JSON file in the ANDROID_PUBLISHER_CREDENTIALS environment variable and don't specify the serviceAccountCredentials property.

Application Default Credentials

Alternatively, you can use Application Default Credentials (and optionally Service Account impersonation) instead of specifying a JSON private key file or environment variable:

android { ... }

play {
    useApplicationDefaultCredentials = true
    impersonateServiceAccount = "[email protected]" // Optional
}

Note: Currently, Service Account impersonation is only supported when using Application Default Credentials.

Task organization

GPP follows the Android Gradle Plugin's (AGP) naming convention: [action][Variant][Thing]. For example, publishPaidReleaseBundle will be generated if you have a paid product flavor.

Lifecycle tasks to publish multiple product flavors at once are also available. For example, publishBundle publishes all variants.

To find available tasks, run ./gradlew tasks --group publishing and use ./gradlew help --task [task] where task is someth

readme truncated — read the full docs on github

Frequently asked questions

Is gradle-play-publisher free to use?

gradle-play-publisher is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does gradle-play-publisher do?

GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishi

What is gradle-play-publisher written in?

gradle-play-publisher is primarily written in Kotlin. Its source is publicly available at https://github.com/Triple-T/gradle-play-publisher, and it has 4,317 GitHub stars.