Scala on Android

The comprehensive documentation

  • Information reliability Sustainable Won't become outdated
  • Last edit Fri Jul 10 19:44:32 2015 +0200
  • Edit on GitHub

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.

  • Information reliability Moderate Might become outdated
  • Last edit Fri Jul 10 19:44:32 2015 +0200
  • Edit on GitHub

Configuration

Add Apk­Signing­Config, Plain­Signing­Config, Prompt­Storepass­Signing­Config and Prompt­Passwords­Signing­Config. These various signing configurations allow control over prompting for keystore and key passwords. The default is Plain­Signing­Config which observes the original behavior from ant builds (reads properties out of local.properties). Set apkSigningConfig 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

Comments