diff options
author | Kenny Root <kenny@the-b.org> | 2010-09-19 03:13:12 -0500 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2010-09-19 03:13:12 -0500 |
commit | ecdaa414a6f771f7783c7cbdaf602a754c361ee6 (patch) | |
tree | 45476a9d27443af67652fb70661278c47fb412d1 | |
parent | eedcd8b18f691a6db9c93646db824f8712724508 (diff) | |
download | connectbot-ecdaa414a6f771f7783c7cbdaf602a754c361ee6.tar.gz connectbot-ecdaa414a6f771f7783c7cbdaf602a754c361ee6.tar.bz2 connectbot-ecdaa414a6f771f7783c7cbdaf602a754c361ee6.zip |
Do elaborate dance to allow toggling Proguard to work
-rw-r--r-- | AndroidManifest.xml | 2 | ||||
-rw-r--r-- | build.properties | 14 | ||||
-rw-r--r-- | build.xml | 29 |
3 files changed, 38 insertions, 7 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 25c4b0d..2951ae3 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -2,7 +2,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.connectbot" android:versionName="1.7.0" - android:versionCode="318" + android:versionCode="319" android:installLocation="auto"> <application diff --git a/build.properties b/build.properties index bd9d530..fe0ba02 100644 --- a/build.properties +++ b/build.properties @@ -3,13 +3,17 @@ # This file must be checked in Version Control Systems, as it is # integral to the build system of your project. -# The name of your application package as defined in the manifest. -# Used by the 'uninstall' rule. -application-package=org.connectbot +# This file is only used by the Ant script. # The name of the source folder. -source-folder=src +source.dir=src # The name of the output folder. -out-folder=bin +out.dir=bin + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. @@ -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> |