Configure SBT to create a released android APK

In order to release an APK for application market, two steps are necessary before publishing:

  • zip aligned
  • APK signing

When using the gitter8 template from AJHAGER, the SBT build task was not activating this two steps.

After some research and lot of tries, I finally succeed to setup my keystore in the build scripts and get a signed-aligned APK

  1. Copy you keystore file in the project folder . My name is simply name  keystore
  2. Modify scala build file  project/build.scala :

Now, if i launch through SBT the task to release the APK, a prompt ask me for a password to read the keystore and a password for the key. The APK generated is now aligned and signed: