aboutsummaryrefslogtreecommitdiffstats
path: root/templates/build.template
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-04-28 15:35:12 -0700
committerXavier Ducrohet <xav@android.com>2010-04-28 15:35:12 -0700
commit9520e97f048059f5a0a20599d6f778786fe2acc9 (patch)
treed28b797424a6cbff6745da72ba9f04ba8d2c4157 /templates/build.template
parent2f3041c9707ca3a196083318d299ba71ab9d5cce (diff)
downloadsdk-9520e97f048059f5a0a20599d6f778786fe2acc9.zip
sdk-9520e97f048059f5a0a20599d6f778786fe2acc9.tar.gz
sdk-9520e97f048059f5a0a20599d6f778786fe2acc9.tar.bz2
Ant: Add customizable targets between the default ones.
Change-Id: I5f187584afb91814ccba4e984c4c45c24557aaae
Diffstat (limited to 'templates/build.template')
-rw-r--r--templates/build.template74
1 files changed, 46 insertions, 28 deletions
diff --git a/templates/build.template b/templates/build.template
index 3959c57..549ce7c 100644
--- a/templates/build.template
+++ b/templates/build.template
@@ -1,40 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="PROJECT_NAME" default="help">
- <!-- The local.properties file is created and updated by the 'android' tool.
- It contains the path to the SDK. It should *NOT* be checked in in Version
- Control Systems. -->
+<!-- The local.properties file is created and updated by the 'android'
+ tool.
+ It contains the path to the SDK. It should *NOT* be checked in in
+ Version Control Systems. -->
<property file="local.properties" />
<!-- The build.properties file can be created by you and is never touched
- by the 'android' tool. This is the place to change some of the default property values
- used by the Ant rules.
+ by the 'android' tool. This is the place to change some of the
+ default property values used by the Ant rules.
Here are some properties you may want to change/update:
application.package
- the name of your application package as defined in the manifest. Used by the
- 'uninstall' rule.
+ The name of your application package as defined in the manifest.
+ Used by the 'uninstall' rule.
source.dir
- the name of the source directory. Default is 'src'.
+ The name of the source directory. Default is 'src'.
out.dir
- the name of the output directory. Default is 'bin'.
+ The name of the output directory. Default is 'bin'.
- Properties related to the SDK location or the project target should be updated
- using the 'android' tool with the 'update' action.
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
- This file is an integral part of the build system for your application and
- should be checked in in Version Control Systems.
+ This file is an integral part of the build system for your
+ application and should be checked in in Version Control Systems.
-->
<property file="build.properties" />
- <!-- The default.properties file is created and updated by the 'android' tool, as well
- as ADT.
- This file is an integral part of the build system for your application and
- should be checked in in Version Control Systems. -->
+ <!-- The default.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+ This file is an integral part of the build system for your
+ application and should be checked in in Version Control Systems. -->
<property file="default.properties" />
- <!-- Custom Android task to deal with the project target, and import the proper rules.
+ <!-- Custom Android task to deal with the project target, and import the
+ proper rules.
This requires ant 1.6.0 or above. -->
<path id="android.antlibs">
<pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
@@ -48,19 +50,35 @@
classname="com.android.ant.SetupTask"
classpathref="android.antlibs" />
- <!-- Execute the Android Setup task that will setup some properties specific to the target,
- and import the build rules files.
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+ <target name="-post-compile">
+ </target>
+-->
- The rules file is imported from
- <SDK>/platforms/<target_platform>/templates/android_rules.xml
- To customize some build steps for your project:
- - copy the content of the main node <project> from android_rules.xml
- - paste it in this build.xml below the <setup /> task.
- - disable the import by changing the setup task below to <setup import="false" />
+ <!-- Execute the Android Setup task that will setup some properties
+ specific to the target, and import the build rules files.
+
+ The rules file is imported from
+ <SDK>/platforms/<target_platform>/ant/ant_rules_r#.xml
- This will ensure that the properties are setup correctly but that your customized
- build steps are used.
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <setup> task.
+ - customize it to your needs.
+ - Customize the whole script.
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, *after* the <setup> task
+ - disable the import of the rules by changing the setup task
+ below to <setup import="false" />.
+ - customize to your needs.
-->
<setup />