Google API

Automating Publishing to the Play Store The Developer Console for Google Play provides API support for you to be able to push to the store automatically. This ability allows you to trigger builds on your continuous integration server (i.e. Jenkins) and have them uploaded the Play store for alpha or beta testing, as well as pushing to production directly.

This guide will show you how you can setup publishing APK's directly through the command-line, or how you configure a continuous integrations server such as Jenkins to do the same. Regardless of which approach, you will need to setup Google API access.

Setup for Google API access Inside the Google Play Store for your project, navigate to Settings -> API Access:

There should be a Service Accounts section where you need to click the Create Service Account button. Click on the link shown on the first step to visit the Google Developers Console.

Click on the Create New Client ID button.

Click to create new Service Account. Make sure to also request the .p12 Key File instead of JSON:

You will be prompted to download the .p12 file. Save it somewhere.

Note the service account email associated with this new account. You should see it appear in the Google Developer Console:

Once you are done, go back to the Google Play Developer Console and navigate to the Settings -> API Access. Make sure the checkboxes for Edit store listing, pricing & distribution, Manage Production APKs, and Manage Alpha & Beta APKs are checked for the Google Service account used. (If you intend to upload an alpha or beta SDK through a Google service account, apparently these permissions must be checked according to this discussion.