Automation for Android release build -


I have ten Android projects in one folder. For each project, I create ant debug < / Code>, so writing a simple script to compile all these projects is not a problem. I use Hudson to build these projects every day, and it works fine.

But now our project needs to release the phase. Then the compilation command gets an ant release to compile the release project, I have to enter the password for each time during the compilation. So I can not do automation for release

The job of this compilation kills me because I have ten projects which all need to interact to input password.

How can I get the release build still automated?

Assume that you are using the recent Android tool, v 9 or v10 .

If you see tools / ant / main_rules.xml in the Android SDK directory:

   & Lt; Input message = "Please enter the password for the alias '$ {key.alias}':" addproperty = "key.alias.password" /> & Lt; / Target & gt; & Lt ;! - A keystore / key alias is not set if target is called through 'release' - & gt; & Lt; Target name = "- release-nosign" unless "" .keystore "> echo> any key.store and key.alias are found in property build.protect. & Lt; / echo & gt; & Lt; echo & gt; Please manually sign $ {out.unsigned.file} & lt; / echo & gt; echo & gt; and run zipline with Android SDK tool. & Lt; / echo Searching for an XML file for & gt; & lt; / target & gt;   

has.keystore

  & Lt;! - Properties to sign in release mode - - & gt; & lt; condition property = "has.keystore"> gt; & lt; and & gt; & gt; isset property = "key.store" / & Gt; & lt; length string = "$ {key.store}" when = "more" length = "0" />  gt; & lt; / more & Gt; & lt; / condition & gt; & lt; condition property = "has.password" & gt; & lt; & gt; & gt; isset property = "has.keystore" /> gt; & lt; Isset property = "key.store.password" /> gt; isset property = "key.alias.password" /> & lt; / and & gt; & lt; / condition & gt;   

So I thought that if you pass in four, define build.xml: key.store , key.alias , key.store.password , key.alias.password .

And remember that for defining security reasons, those defining on the command line do not have to pass. :)

Comments