Automate Android Build and Sign Process?


#1

I went through the publishing guide.

Whenever I want to build a release for our internal testing, I have to do a release build, and sign it in CLI.
This is something I repeat everyday. Is there a way to automate this build and signing process with a keystore?

Or could I write a script to combine all the publishing steps into just one script?

Alternatively, is there another way to distribute apps easily for your teams internal testing?


#2

Did you have a look at Ionic View?


#3

Thanks for the reply. I’m looking for a way to distribute the built app without having to download the Ionic View app. (sometimes we forward these .apk files for reviewing as well)


#4

Ok, well you can certainly write a shell script or similar that automates the various steps. You can specify a password with the -storepass and -keypass options when calling jarsigner to avoid any manual steps. (Although this way anybody with access with that script can see the password of course.)


#5

Here’s your answer:

How to integrate the signing process into the process ionic build --release, for Android:
https://solidfoundationwebdev.com/blog/posts/how-to-automatically-sign-your-android-apk-at-build-time-with-ionic