• Home

Android APK signing automation with Ionicframework and Gradle

It is very easy to automate signing at build time with ionicframework (or cordova) and gradle.

You have to create a release-signing.properties file in platforms/android/, this file will be used by gradle to launch signing tools with the right parameters.

It should be as follows :

storeFile=/thepathto/key.p12
storeType=jks
keyAlias=yourkeyalias
// optional
// storePassword
=yourstorepassword
// keyPassword=yourkeypassword

My key was generated using Java tools :

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Warning :

  • don't loose your passphrase
  • don't loose your keystore file
  • if you forgot your alias_name you can display it with : keytool -list -keystore my-release-key.keystore

Bonus : gradle will also zipalign your apk. Ready to upload !



 

Print Email