diff options
| author | Xavier Ducrohet <xav@android.com> | 2011-09-22 19:14:22 -0700 |
|---|---|---|
| committer | Xavier Ducrohet <xav@android.com> | 2011-09-23 09:37:17 -0700 |
| commit | 15fa2cb60993bddf40e5f2483e19345e9d77695d (patch) | |
| tree | 4db157a1e70c2f68034c9bf17fb2c3a26c0b1d66 /files/ant | |
| parent | a9a28238f7b20d7c0a05c95afad02fcdb34e0d0e (diff) | |
| download | sdk-15fa2cb60993bddf40e5f2483e19345e9d77695d.zip sdk-15fa2cb60993bddf40e5f2483e19345e9d77695d.tar.gz sdk-15fa2cb60993bddf40e5f2483e19345e9d77695d.tar.bz2 | |
Make the zip align ant step check timestamp on intput/output.
If the output is more recent than the input, zipalign does nothing.
Change-Id: Ic1d7518a28fbb2db8895903e5cd0fd2976931b41
Diffstat (limited to 'files/ant')
| -rw-r--r-- | files/ant/build.xml | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/files/ant/build.xml b/files/ant/build.xml index 42e7420..9387ff2 100644 --- a/files/ant/build.xml +++ b/files/ant/build.xml @@ -84,6 +84,10 @@ classname="com.android.ant.ApkBuilderTask" classpathref="android.antlibs" /> + <taskdef name="zipalign" + classname="com.android.ant.ZipAlignTask" + classpathref="android.antlibs" /> + <taskdef name="xpath" classname="com.android.ant.XPathTask" classpathref="android.antlibs" /> @@ -150,11 +154,6 @@ <condition property="verbosity" value="verbose" else="quiet"> <istrue value="${verbose}" /> </condition> - <!-- This is needed to switch verbosity of zipalign. Depends exclusively on 'verbose' - --> - <condition property="v.option" value="-v" else=""> - <istrue value="${verbose}" /> - </condition> <!-- properties for signing in release mode --> <condition property="has.keystore"> @@ -293,14 +292,11 @@ <attribute name="in.package" /> <attribute name="out.package" /> <sequential> - <echo>Running zip align on final apk...</echo> - <exec executable="${zipalign}" failonerror="true"> - <arg line="${v.option}" /> - <arg value="-f" /> - <arg value="4" /> - <arg path="@{in.package}" /> - <arg path="@{out.package}" /> - </exec> + <zipalign + executable="${zipalign}" + input="@{in.package}" + output="@{out.package}" + verbose="${verbose}" /> </sequential> </macrodef> |
