Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Ant boilerplate for Android
<?xml version="1.0" encoding="UTF-8"?>
<project name="AndroidAntBoilerPlateExample" >
<!-- Copy Config.java to our source tree, replacing custom tokens with values in build.properties. The configuration depends on "clean" because otherwise the build system will not detect changes in the configuration. -->
<target
name="dev"
description="Copy env filtered values" >
<!-- Copy the configuration file, replacing tokens in the file. -->
<copy
encoding="utf-8"
overwrite="true"
todir="res"
verbose="true" >
<fileset dir="config/filtered" />
<filterset refid="filterSetDev" />
</copy>
</target>
<filterset id="filterSetDev" >
<filtersfile file="config/filters/dev.properties" />
</filterset>
<target
name="test"
description="Copy env filtered values" >
<!-- Copy the configuration file, replacing tokens in the file. -->
<copy
encoding="utf-8"
overwrite="true"
todir="res"
verbose="true" >
<fileset dir="config/filtered" />
<filterset refid="filterSetTest" />
</copy>
</target>
<filterset id="filterSetTest" >
<filtersfile file="config/filters/test.properties" />
</filterset>
<target
name="prod"
description="Copy env filtered values" >
<!-- Copy the configuration file, replacing tokens in the file. -->
<copy
encoding="utf-8"
overwrite="true"
todir="res"
verbose="true" >
<fileset dir="config/filtered" />
<filterset refid="filterSetProd" />
</copy>
</target>
<filterset id="filterSetProd" >
<filtersfile file="config/filters/prod.properties" />
</filterset>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment