aboutsummaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-12-07 16:48:11 -0800
committerXavier Ducrohet <xav@android.com>2012-01-30 14:12:21 -0800
commit63bf713092680bc30c55ae5c62bd4200e3fef3e1 (patch)
tree7ed8cfd95dd13820f773610b0e234705cb18f83b /files
parent80f7e60b18da0cbd481a470e3a8965b61b7bf339 (diff)
downloadsdk-63bf713092680bc30c55ae5c62bd4200e3fef3e1.zip
sdk-63bf713092680bc30c55ae5c62bd4200e3fef3e1.tar.gz
sdk-63bf713092680bc30c55ae5c62bd4200e3fef3e1.tar.bz2
Add post package and post build Ant hooks.
Change-Id: I3bae567328e1ba615df478cacca72667ef3e6359
Diffstat (limited to 'files')
-rw-r--r--files/ant/build.xml32
1 files changed, 18 insertions, 14 deletions
diff --git a/files/ant/build.xml b/files/ant/build.xml
index 575b3ec..622d558 100644
--- a/files/ant/build.xml
+++ b/files/ant/build.xml
@@ -872,6 +872,9 @@
</do-only-if-not-library>
</target>
+ <target name="-post-package" />
+ <target name="-post-build" />
+
<target name="-set-mode-check">
<fail if="build.is.mode.set"
message="Cannot run two different modes at the same time. If you are running more than one debug/release/instrument type targets, call them from different Ant calls." />
@@ -909,7 +912,7 @@
</target>
<!-- Builds debug output package -->
- <target name="-do-debug" depends="-set-debug-mode, -debug-obfuscation-check, -package">
+ <target name="-do-debug" depends="-set-debug-mode, -debug-obfuscation-check, -package, -post-package">
<!-- only create apk if *not* a library project -->
<do-only-if-not-library elseText="Library project: do not create apk..." >
<sequential>
@@ -917,12 +920,12 @@
<echo>Debug Package: ${out.final.file}</echo>
</sequential>
</do-only-if-not-library>
+ <record-build-info />
</target>
<!-- Builds debug output package -->
- <target name="debug" depends="-set-debug-files, -do-debug"
+ <target name="debug" depends="-set-debug-files, -do-debug, -post-build"
description="Builds the application and signs it with a debug key.">
- <record-build-info />
</target>
@@ -1006,15 +1009,7 @@
</if>
</target>
- <!-- This runs -package-release and -release-nosign first and then runs
- only if release-sign is true (set in -release-check,
- called by -release-no-sign)-->
- <target name="release"
- depends="-set-release-mode, -release-obfuscation-check, -package, -release-prompt-for-password, -release-nosign"
- if="has.keystore"
- description="Builds the application. The generated apk file must be signed before
- it is published.">
-
+ <target name="-release-sign" if="has.keystore" >
<!-- only create apk if *not* a library project -->
<do-only-if-not-library elseText="Library project: do not create apk..." >
<sequential>
@@ -1032,14 +1027,23 @@
verbose="${verbose}" />
<!-- Zip aligns the APK -->
- <zipalign-helper in.package="${out.unaligned.file}"
- out.package="${out.final.file}" />
+ <zipalign-helper
+ in.package="${out.unaligned.file}"
+ out.package="${out.final.file}" />
<echo>Release Package: ${out.final.file}</echo>
</sequential>
</do-only-if-not-library>
<record-build-info />
</target>
+ <!-- This runs -package-release and -release-nosign first and then runs
+ only if release-sign is true (set in -release-check,
+ called by -release-no-sign)-->
+ <target name="release"
+ depends="-set-release-mode, -release-obfuscation-check, -package, -post-package, -release-prompt-for-password, -release-nosign, -release-sign, -post-build"
+ description="Builds the application in release mode.">
+ </target>
+
<!-- ******************************************************* -->
<!-- ************ Instrumented specific targets ************ -->
<!-- ******************************************************* -->