8

I'm a big fan of continuous integration / deployment and we build our Android apps with Jenkins and deploy every build from specific branches (mostly git flow's develop branch) to our testers via HockeyApp.

What I want to achieve is that every new (tagged) commit to master will endup in the Play Store. So I don't have to manually upload APKs via the Play Store developer console. I've already searched for an API. But Google doesn't provide any and the two unofficial projects I found (Android Market API and Play PHP API) only support downloading metrics like the download count of your app.

So can someone think of a way to upload APKs via cURL or a small script?

Jens Kohl
  • 5,899
  • 11
  • 48
  • 77
  • 1
    It's definitely possible, but you'll have to go through authentication and everything else that the browser would do (POST upload APK, POST metadata). You'll also have to keep it up to date, as the store interface is adapted. It might also be against the terms and conditions of Google Play, **most importantly**. – David Snabel-Caunt Mar 01 '13 at 10:22
  • possible duplicate of [Is there an official API for the Google Play Store app?](http://stackoverflow.com/questions/12017291/is-there-an-official-api-for-the-google-play-store-app) – Ben Lings Jan 15 '15 at 17:44
  • @BenLings Nope, this is not a duplicate, because that question aims for the user space. Deploying an App to the Play Store aims for developers, and as such there would be two seperate APIs - if it will ever go public. – Jens Kohl Jan 16 '15 at 09:22

2 Answers2

5

Google releases a new API for automatic deploy to Alpha/Beta and Production channels!

take a look here

Api features:

  • Uploading new versions of an app Releasing apps, by assigning APKs to various Tracks (alpha, beta, staged rollout, or production)
  • Creating and modifying Google Play Store listings, including localized text and graphics and multi-device screenshots

Updated:

Some java samples about how to use the API: samples

Updated (08-June-2015):

I found and I'm using a gradle plugin that use this API, its called gradle-play-publisher. It is very easy to use, you need only to get a Service account and download a p12 file with a certificate (PlayStore --> Settings --> API access >> "Create Service Account" >> choose p12 format and read instruction in plugin website!

Tano
  • 3,620
  • 1
  • 29
  • 31
3

You'll have a hard time performing the oAuth authentication with curl to get access to the dashboard. I think in all honesty the quickest route to a solution here would be to create a AHK script which performs the upload through a browser where you are prelogged in.

As long as Google doesn't provide an API, you will end up with a hack. Might as well go with the hack that is quickest to implement.

Nilzor
  • 18,082
  • 22
  • 100
  • 167