android – signing applications automatically with password in ant-ThrowExceptions

Exception or error:

Currently i have a build process in place for all of our apps using ANT. I am adding the ability to build a release now and sign the apps.

Currently i have the ant.properties with the correct properties. And it is in all the projects. And when i build the projects it works fine. Signs, aligns and gives me what i need. HOWEVER, we have many apps and they are all built in the build process.

So the problem is, the user is having to type the password in at the Please enter keystore password and the Please enter password for alias.

I was wondering if there was a way to get ant to enter that password for us or is there another way to sign using ant that would work? Maybe i could supply the password when the build process starts and just use that password every time it is asked to be used.

Thanks

How to solve:

I just have these lines in my ant.properties and it signs automatically

key.store.password=mypasswordOne
key.alias.password=mypasswordTwo
key.store=c:/users/myname/my-release-key.keystore
key.alias=release_alias

###

You can use Ant variables in path definition.

key.store = ${user.home}/.keystore 

Leave a Reply

Your email address will not be published. Required fields are marked *