OSDN Git Service

Improve capability of the post-compile target.
authorXavier Ducrohet <xav@android.com>
Mon, 23 Aug 2010 21:42:33 +0000 (14:42 -0700)
committerXavier Ducrohet <xav@android.com>
Mon, 23 Aug 2010 22:09:00 +0000 (15:09 -0700)
Make the dex target use a different property to read
the input folder for classes to dexify.
By default the new property has the same value but can
be overriden if a post-compile target modify (obfuscate)
code into a different location.

Merged from master into tools_r7

Change-Id: I1fe2fd2a2678d8c4354702250cea1481f74dd7cf

files/ant/ant_rules_r3.xml
templates/build.template

index 8876c7d..7848862 100644 (file)
@@ -75,6 +75,7 @@
     <property name="out.absolute.dir" location="${out.dir}" />
     <property name="out.classes.dir" value="${out.absolute.dir}/classes" />
     <property name="out.classes.absolute.dir" location="${out.classes.dir}" />
+    <property name="out.dex.input.absolute.dir" value="${out.classes.absolute.dir}" />
 
     <!-- Intermediate files -->
     <property name="dex.file.name" value="classes.dex" />
              <arg value="--output=${intermediate.dex.file}" />
              <extra-parameters />
              <arg line="${verbose.option}" />
-             <arg path="${out.classes.absolute.dir}" />
+             <arg path="${out.dex.input.absolute.dir}" />
              <fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
              <path refid="android.libraries.jars" />
              <external-libs />
index d8bd709..7ab06c0 100644 (file)
     </target>
     <target name="-pre-compile">
     </target>
+
+    [This is typically used for code obfuscation.
+     Compiled code location: ${out.classes.absolute.dir}
+     If this is not done in place, override ${out.dex.input.absolute.dir}]
     <target name="-post-compile">
     </target>
 -->