BT

Continuous Integration for Google Play Apps

| by Sergio De Simone Follow 17 Followers on Jul 05, 2018. Estimated reading time: 1 minute |

At the last Google I/O conference, Google introduced version 3 of its Google Play Publishing API, which enables developers to publish their apps to Google Play from their continuous integration workflows.

The Google Play Publishing API makes it possible for developers to automate app distribution tasks, such as uploading a new version of an app, releasing an app to a specific track, and managing information displayed in the Play Store. Version 3 supports a number of operations that were previously only available through the Play Console, thus allowing to carry through entire workflows in a fully automated way.

The basic message format used by the Publishing API is the following:

{
  "track": "production",
  "releases": [
    {
      "name": "Release One", 
      "versionCodes": ["100"],
      "status": "completed"
    }
  ]
}

In addition to releasing to production, you can release to a testing track (alpha or beta) to provide access to your tester base. Additionally, you can deploy a new version of your app by doing a staged rollout, which ensures the new release is only available to a limited number of users. As you get more confident about your app quality, you can gradually increase the number of users that are included in the rollout. The following JSON message shows you how you can handle a staged rollout for a new release of an app:

{
  "track": "production",
  "releases": [
    {
      "versionCodes": ["100"],
      "status": "completed"
    },
    {
      "versionCodes": ["200"],
      "status": "inProgress",
      "userFraction": 0.1
    }
  ]
}

You can change the status to halted to quickly respond to any major issue you detect in the field.

Another interesting possibility offered by the Publishing API is creating a draft release which is only available when you log in to the Play Console. This makes it possible to automatically prepare a release but postpone its effective availability until a product manager explicitly approves it.

{
  "track": "production",
  "releases": [
    {
      "name": "Big Launch",
      "versionCodes": ["200"],
      "status": "draft"
    }
  ]
}

As a final note, you can also include release notes in any number of supported languages.

If you want to get started with the Publishing API, do not miss the sample code Google made available.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT