aboutsummaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-10-25 14:24:09 -0700
committerXavier Ducrohet <xav@android.com>2010-10-25 14:55:32 -0700
commita6324a21d1912144ed4e468ab5e127169992ab6e (patch)
tree4c4f64eb46203d9f1965b3b2611968bb78cbdd80 /files
parent76e0b61e01de334ec13a48b5c2ce6d81707e743d (diff)
downloadsdk-a6324a21d1912144ed4e468ab5e127169992ab6e.zip
sdk-a6324a21d1912144ed4e468ab5e127169992ab6e.tar.gz
sdk-a6324a21d1912144ed4e468ab5e127169992ab6e.tar.bz2
Fix external jar support when building with proguard.
Change-Id: I3dafb284770f475d70a212cbe22cdae6bff36ff7
Diffstat (limited to 'files')
-rw-r--r--files/ant/main_rules.xml26
1 files changed, 23 insertions, 3 deletions
diff --git a/files/ant/main_rules.xml b/files/ant/main_rules.xml
index 83f2a63..f573f48 100644
--- a/files/ant/main_rules.xml
+++ b/files/ant/main_rules.xml
@@ -177,10 +177,23 @@
<element name="external-libs" optional="yes" />
<element name="extra-parameters" optional="yes" />
<sequential>
- <!-- sets the input for dex. If a pre-dex task sets it to something else
- this has no effect -->
+ <!-- sets the primary input for dex. If a pre-dex task sets it to
+ something else this has no effect -->
<property name="out.dex.input.absolute.dir" value="${out.classes.absolute.dir}" />
+ <!-- set the secondary dx input: the project (and library) jar files
+ If a pre-dex task sets it to something else this has no effect -->
+ <if>
+ <condition>
+ <isreference refid="out.dex.jar.input.ref" />
+ </condition>
+ <else>
+ <path id="out.dex.jar.input.ref">
+ <path refid="jar.libs.ref" />
+ </path>
+ </else>
+ </if>
+
<echo>Converting compiled files and external libraries into ${intermediate.dex.file}...</echo>
<apply executable="${dx}" failonerror="true" parallel="true">
<arg value="--dex" />
@@ -188,7 +201,7 @@
<extra-parameters />
<arg line="${verbose.option}" />
<arg path="${out.dex.input.absolute.dir}" />
- <path refid="jar.libs.ref" />
+ <path refid="out.dex.jar.input.ref" />
<external-libs />
</apply>
</sequential>
@@ -535,6 +548,13 @@
<isset property="proguard.config" />
</and>
</condition>
+ <if condition="${proguard.enabled}">
+ <then>
+ <!-- Secondary dx input (jar files) is empty since all the
+ jar files will be in the obfuscated jar -->
+ <path id="out.dex.jar.input.ref" />
+ </then>
+ </if>
</target>
<target name="-set-release-mode">