aboutsummaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml29
1 files changed, 28 insertions, 1 deletions
diff --git a/build.xml b/build.xml
index 80b96fa..9159bfd 100644
--- a/build.xml
+++ b/build.xml
@@ -43,6 +43,9 @@
<!-- Begin custom ConnectBot stuff -->
+ <property name="proguard.out.dir" value="${out.dir}/proguard.out"/>
+ <property name="out.dex.input.absolute.dir" value="${proguard.out.dir}"/>
+
<target name="check-proguard">
<available file="tools/proguard.jar" property="have.proguard"/>
</target>
@@ -51,13 +54,37 @@
<fail unless="have.proguard">You requested ProGuard, but you don't have the JAR available! See README</fail>
</target>
+ <target name="-pre-build" depends="create.out.dir, link.out.dir"/>
+
<target name="-post-compile" depends="proguard.execute"/>
- <target name="proguard.execute" depends="compile" if="have.proguard">
+ <target name="remove.out.symlink">
+ <symlink action="delete" link="${proguard.out.dir}" failonerror="false"/>
+ </target>
+
+ <target name="check.out.exists" depends="remove.out.symlink">
+ <available file="${proguard.out.dir}" property="proguard.out.is.dir"/>
+ </target>
+
+ <target name="delete.out.dir" depends="check.out.exists" if="proguard.out.is.dir">
+ <delete dir="${proguard.out.dir}"/>
+ </target>
+
+ <target name="create.out.dir" depends="delete.out.dir" if="have.proguard">
+ <mkdir dir="${proguard.out.dir}"/>
+ </target>
+
+ <target name="link.out.dir" depends="delete.out.dir" unless="have.proguard">
+ <symlink link="${proguard.out.dir}" resource="${out.classes.dir}"/>
+ </target>
+
+ <target name="proguard.execute" if="have.proguard">
+ <mkdir dir="${out.dex.input.absolute.dir}"/>
<taskdef resource="proguard/ant/task.properties"
classpath="tools/proguard.jar" />
<proguard configuration="proguard.flags" printusage="${out.dir}/proguard.usage">
<injar path="${out.classes.dir}"/>
+ <outjar path="${proguard.out.dir}"/>
<libraryjar path="${android.jar}"/>
</proguard>
</target>