Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3727)

Unified Diff: build/android/ant/sdk-targets.xml

Issue 10959027: Make apk targets remove .class files before compile (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/ant/sdk-targets.xml
diff --git a/build/android/ant/sdk-targets.xml b/build/android/ant/sdk-targets.xml
index 6707b08a484aab454595d2ad55ab844fc2fc7c96..7909daa32a78d7e2f5dbe62c7632f293688f81be 100644
--- a/build/android/ant/sdk-targets.xml
+++ b/build/android/ant/sdk-targets.xml
@@ -13,6 +13,17 @@
for aidl and javac. This file defines targets which can be used to
override targets used by tools.
-->
+ <target name="-pre-compile">
+ <!--
+ Remove all .class files from the output directory. This prevents inclusion of incorrect .class
+ files in the final apk. For example, if a .java file was deleted, the apk should not contain
+ the .class files for that .java from previous builds.
+ -->
+ <delete>
+ <fileset dir="${out.classes.absolute.dir}" includes="**/*.class"/>
+ </delete>
+ </target>
+
<!--
Override the -compile target.
This target requires 'javac.custom.classpath' to be set to reference
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698