aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-07-03 14:55:24 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-07-03 14:55:24 -0700
commit0d8f973905a4925e00eb9e32887c192b2148b29f (patch)
tree243797a8225edba994ba5cec88a1f093d73db894
parent034490615c4bc8e80e440fe98b3306736e08354a (diff)
parent1c6e494f48261efe74278568c4aa81394502d802 (diff)
downloadsdk-0d8f973905a4925e00eb9e32887c192b2148b29f.zip
sdk-0d8f973905a4925e00eb9e32887c192b2148b29f.tar.gz
sdk-0d8f973905a4925e00eb9e32887c192b2148b29f.tar.bz2
Merge "Fix detecting previous build states."
-rw-r--r--files/ant/build.xml71
1 files changed, 35 insertions, 36 deletions
diff --git a/files/ant/build.xml b/files/ant/build.xml
index aa17a36..8edba16 100644
--- a/files/ant/build.xml
+++ b/files/ant/build.xml
@@ -406,42 +406,6 @@
</then>
</if>
- <!-- If the "debug" build type changed, clear out the compiled code.
- This is to make sure the new BuildConfig.DEBUG value is picked up
- as javac can't deal with this type of change in its dependency computation. -->
- <if>
- <condition>
- <and>
- <length string="${build.last.is.packaging.debug}" trim="true" when="greater" length="0" />
- <not><equals
- arg1="${build.is.packaging.debug}"
- arg2="${build.last.is.packaging.debug}" /></not>
- </and>
- </condition>
- <then>
- <echo level="info">Switching between debug and non debug build: Deleting previous compilation output...</echo>
- <delete dir="${out.classes.absolute.dir}" verbose="${verbose}" />
- </then>
- <else>
- <!-- Else, we may still need to clean the code, for another reason.
- special case for instrumented: if the previous build was
- instrumented but not this one, clear out the compiled code -->
- <if>
- <condition>
- <and>
- <istrue value="${build.last.is.instrumented}" />
- <isfalse value="${build.is.instrumented}" />
- </and>
- </condition>
- <then>
- <echo level="info">Switching from instrumented to non-instrumented build: Deleting previous compilation output...</echo>
- <delete dir="${out.classes.absolute.dir}" verbose="${verbose}" />
- </then>
- </if>
- </else>
- </if>
-
-
<!-- get the project manifest package -->
<xpath input="${manifest.abs.file}"
expression="/manifest/@package" output="project.app.package" />
@@ -506,6 +470,41 @@
<property name="build.last.is.packaging.debug" value="" />
<property name="build.last.is.signing.debug" value="" />
+ <!-- If the "debug" build type changed, clear out the compiled code.
+ This is to make sure the new BuildConfig.DEBUG value is picked up
+ as javac can't deal with this type of change in its dependency computation. -->
+ <if>
+ <condition>
+ <and>
+ <length string="${build.last.is.packaging.debug}" trim="true" when="greater" length="0" />
+ <not><equals
+ arg1="${build.is.packaging.debug}"
+ arg2="${build.last.is.packaging.debug}" /></not>
+ </and>
+ </condition>
+ <then>
+ <echo level="info">Switching between debug and non debug build: Deleting previous compilation output...</echo>
+ <delete dir="${out.classes.absolute.dir}" verbose="${verbose}" />
+ </then>
+ <else>
+ <!-- Else, we may still need to clean the code, for another reason.
+ special case for instrumented: if the previous build was
+ instrumented but not this one, clear out the compiled code -->
+ <if>
+ <condition>
+ <and>
+ <istrue value="${build.last.is.instrumented}" />
+ <isfalse value="${build.is.instrumented}" />
+ </and>
+ </condition>
+ <then>
+ <echo level="info">Switching from instrumented to non-instrumented build: Deleting previous compilation output...</echo>
+ <delete dir="${out.classes.absolute.dir}" verbose="${verbose}" />
+ </then>
+ </if>
+ </else>
+ </if>
+
<echo level="info">Resolving Build Target for ${ant.project.name}...</echo>
<!-- load project properties, resolve Android target, library dependencies
and set some properties with the results.