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.
addSbtPlugin( "io.taig" % "sbt-googleplay" % "1.1.1" )
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" ) )
)
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 )
}
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