BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Continuous Integration for Google Play Apps

Continuous Integration for Google Play Apps

This item in japanese

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
Style

BT