These 4 files (build.xml, local.properties, projects.properties, proguard.cfg) are auto-generated when running:
android update project --name TestApp --t
The build.xml
as generated by the android
tool (at least when using Android SDK r20) contains this piece of code:
So what I do to create additional targets or customize existing targets is to create a custom_rules.xml
file with these new targets. Note that in my tests the targets needed to be nested in a
tag, so simply copy the first two lines of your generated build.xml
to custom_rules.xml
, and don't forget about the closing tag in the end. As
custom_rules.xml
will not be overwritten by android update
your changes will be persistent and can be checked into your SCM tool of choice.