Upload signed applications to Google Play with a single command
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
project
src/main/scala/io/taig/sbt/googleplay
.gitignore
CHANGELOG.md
LICENSE
README.md
build.sbt
circle.yml

README.md

sbt Google Play plugin

CircleCI

Upload signed applications to Google Play with a single command

This sbt plugin relies on sbt-android to package and sign an apk file to then publish the app via the Google Play Developer API.

Installation

addSbtPlugin( "io.taig" % "sbt-googleplay" % "1.1.1" )

Usage

Authentication

In order to authenticate with the Google Play Developer API, you have to create a service account in the Google Play Developer Console and obtain a P12 service account key.

Please note that the permission system for service accounts does not work as expected, so you have to at least grant the following permissions:

  • Edit store listing, pricing & distribution
  • Manage Production APKs
  • Manage Alpha & Beta APKs
  • Manage Alpha & Beta users
lazy val app = project( ... )
    .enablePlugins( GooglePlayPlugin )
    .settings(
        googlePlayTrack := "alpha",
        googlePlayServiceAccountEmail := System.getenv( "GOOGLE_PLAY_SERVICE_ACCOUNT_EMAIL" ),
        googlePlayServiceAccountKey := file( System.getenv( "GOOGLE_PLAY_SERVICE_ACCOUNT_KEY" ) )
    )

Publishing

When properly configured it is now possible to build, package and publish the app with a single command:

sbt googlePlayPublish

As of version 1.1.1, it is also possible to simply publish an existing apk file:

sbt googlePlayPublishFile ./path/to/my/app.apk
myPublishingTask := {
    val apk: File = ???
    googlePlayPublishApk.value( apk )
}

Changelog

It is optionally possible to submit a changelog via the googlePlayChangelog task while publishing the apk.

googlePlayChangelog := Map(
    "en-US" -> "Fixed all the bugs"
)

Keep in mind to not exceed the 500 character limit