am 6440b667: Merge change 26292 into eclair

Merge commit '6440b667b07f085faf5916a1c7836597ac0f6b63' into eclair-plus-aosp

* commit '6440b667b07f085faf5916a1c7836597ac0f6b63':
  Increase reusability of zipalign macrodef
This commit is contained in:
Piotr Gurgul
2009-09-21 17:39:41 -07:00
committed by Android Git Automerger

View File

@@ -145,19 +145,20 @@
</sequential> </sequential>
</macrodef> </macrodef>
<!-- This is macro used only for sharing code among two targets, -debug and <!-- This is macro which zipaligns in.package and outputs it to out.package. Used by targets
-debug-with-emma which do exactly the same but differ in dependencies --> debug, -debug-with-emma and release.-->
<macrodef name="debug-helper"> <macrodef name="zipalign-helper">
<attribute name="in.package" />
<attribute name="out.package" />
<sequential> <sequential>
<echo>Running zip align on final apk...</echo> <echo>Running zip align on final apk...</echo>
<exec executable="${zipalign}" failonerror="true"> <exec executable="${zipalign}" failonerror="true">
<arg line="${v.option}" /> <arg line="${v.option}" />
<arg value="-f" /> <arg value="-f" />
<arg value="4" /> <arg value="4" />
<arg path="${out.debug.unaligned.package}" /> <arg path="@{in.package}" />
<arg path="${out.debug.package}" /> <arg path="@{out.package}" />
</exec> </exec>
<echo>Debug Package: ${out.debug.package}</echo>
</sequential> </sequential>
</macrodef> </macrodef>
@@ -271,7 +272,9 @@
<!-- Builds debug output package, provided all the necessary files are already dexed --> <!-- Builds debug output package, provided all the necessary files are already dexed -->
<target name="debug" depends="-package-debug-sign" <target name="debug" depends="-package-debug-sign"
description="Builds the application and signs it with a debug key."> description="Builds the application and signs it with a debug key.">
<debug-helper /> <zipalign-helper in.package="${out.debug.unaligned.package}"
out.package="${out.debug.package}" />
<echo>Debug Package: ${out.debug.package}</echo>
</target> </target>
<target name="-release-check"> <target name="-release-check">
@@ -312,13 +315,8 @@
verbose="${verbose}" /> verbose="${verbose}" />
<!-- Zip aligns the APK --> <!-- Zip aligns the APK -->
<echo>Running zip align on final apk...</echo> <zipalign-helper in.package="${out.unaligned.package}"
<exec executable="${zipalign}" failonerror="true"> out.package="${out.release.package}" />
<arg value="-f" />
<arg value="4" />
<arg path="${out.unaligned.package}" />
<arg path="${out.release.package}" />
</exec>
<echo>Release Package: ${out.release.package}</echo> <echo>Release Package: ${out.release.package}</echo>
</target> </target>
@@ -392,7 +390,8 @@
</target> </target>
<target name="-debug-with-emma" depends="-package-with-emma"> <target name="-debug-with-emma" depends="-package-with-emma">
<debug-helper /> <zipalign-helper in.package="${out.debug.unaligned.package}"
out.package="${out.debug.package}" />
</target> </target>
<target name="-install-with-emma" depends="-debug-with-emma"> <target name="-install-with-emma" depends="-debug-with-emma">