Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload an Android app to the app store via command line

I found this question for iOS and basically worry about the same thing for Android.

As part of the countinues integration process of my Android application, I want to create a process that will automatically upload the app (.apk) file to the Google PlayStore.

I found this website explaining how to create an .apk automated.

So I wonder if there is a way to upload the .apk file to the PlayStore via command line?

Thanks!

like image 218
Ron Avatar asked Feb 17 '14 12:02

Ron


2 Answers

These days you can do this fairly easily with Gradle Play Publisher:

plugins {
    id 'com.android.application'
    id 'com.github.triplet.play' version 'x.x.x'
}

android {
    ...
}

play {
    serviceAccountCredentials = file("your-credentials.json")
}

Then it's as simple as running ./gradlew publishApk.

like image 132
SUPERCILEX Avatar answered Sep 30 '22 18:09

SUPERCILEX


This API should do it, as long as you are not publishing new app, but new version of an existing app. I've not used it yet though. https://developers.google.com/android-publisher/

You could also use Jenkins, there is Jenkins plug-in for this purpose: https://wiki.jenkins-ci.org/display/JENKINS/Google+Play+Android+Publisher+Plugin

like image 39
diidu Avatar answered Sep 30 '22 17:09

diidu