Android APK signing automation with Ionicframework and Gradle

Written by lenny cartier.

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 :

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



 

Print