aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2010-09-19 03:13:12 -0500
committerKenny Root <kenny@the-b.org>2010-09-19 03:13:12 -0500
commitecdaa414a6f771f7783c7cbdaf602a754c361ee6 (patch)
tree45476a9d27443af67652fb70661278c47fb412d1
parenteedcd8b18f691a6db9c93646db824f8712724508 (diff)
downloadconnectbot-ecdaa414a6f771f7783c7cbdaf602a754c361ee6.tar.gz
connectbot-ecdaa414a6f771f7783c7cbdaf602a754c361ee6.tar.bz2
connectbot-ecdaa414a6f771f7783c7cbdaf602a754c361ee6.zip
Do elaborate dance to allow toggling Proguard to work
-rw-r--r--AndroidManifest.xml2
-rw-r--r--build.properties14
-rw-r--r--build.xml29
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.
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>