Publishing
If you test your app via sbt run
during the development process, the app is automatically signed with a debug certificate. This does obviously not suffice in order to publish to the Google Play platform. When your app is ready for prime time and your Google Developer Account is set up, then it's about time to sign the *.apk
with the help of sbt.
Configuration
Add
ApkSigningConfig
,PlainSigningConfig
,PromptStorepassSigningConfig
andPromptPasswordsSigningConfig
. These various signing configurations allow control over prompting for keystore and key passwords. The default isPlainSigningConfig
which observes the original behavior from ant builds (reads properties out of local.properties). SetapkSigningConfig
in Android to one of these variants to perform non-default behavior.
The easiest way is to provide all information in the local.properties
file at your project's root directory. This file should obviously be not checked into your VCS.
key.alias: key-alias
key.alias.password: password (optional, defaults to key.store.password)
key.store: /path/to/your/.keystore
key.store.password: keystore-password
key.store.type: pkcs12 (optional, defaults to jks)
For more advanced features (e.g. password prompt), please see the available sbt configuration keys of the Android SDK Plugin for SBT.
Via sbt packageRelease
, you are now able to generate a signed *.apk
file, that will be stored in the ./target/android-bin/
folder. In this condition it is ready for Goolge Play upload.
Further reading
- Android tools: Publishing
Official tools documentation
- Android SDK Plugin for SBT
"An easy-to-use sbt plugin for working with all Android projects"