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

Unified Diff: build/android/ant/chromium-jars.xml

Issue 10914080: Make jar 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/chromium-jars.xml
diff --git a/build/android/ant/chromium-jars.xml b/build/android/ant/chromium-jars.xml
index efd7878c1c7e4d46b09d12c7692fa3bd69b3b6dd..952147368b4ba83e050b99364cfce0843250b9f8 100644
--- a/build/android/ant/chromium-jars.xml
+++ b/build/android/ant/chromium-jars.xml
@@ -26,12 +26,22 @@
<filelist files="${ADDITIONAL_SRC_DIRS}" />
</path>
- <property-value name="javac.srcdir" value="src:${toString:javac.srcdirs.additional}"/>
+ <property-value
+ name="javac.srcdir"
+ value="src:${toString:javac.srcdirs.additional}"
+ />
- <property-location name="lib.dir" location="${PRODUCT_DIR}/lib.java"
- check-exists="false"/>
- <property-location name="dest.dir" location="${PRODUCT_DIR}/java/${PACKAGE_NAME}"
- check-exists="false"/>
+ <property-location
+ name="lib.dir"
+ location="${PRODUCT_DIR}/lib.java"
+ check-exists="false"
+ />
+
+ <property-location
+ name="dest.dir"
+ location="${PRODUCT_DIR}/java/${PACKAGE_NAME}"
+ check-exists="false"
+ />
<target name="init">
<!-- Create the time stamp -->
@@ -39,6 +49,15 @@
<!-- Create the build directory structure used by compile -->
<mkdir dir="${lib.dir}"/>
<mkdir dir="${dest.dir}"/>
+
+ <!-- Remove all .class files from dest.dir. This prevents inclusion of
+ incorrect .class files in the final .jar. For example, if a .java file
+ was deleted, the .jar should not contain the .class files for that
+ .java from previous builds.
+ -->
+ <delete>
+ <fileset dir="${dest.dir}" includes="**/*.class"/>
+ </delete>
</target>
<target name="compile" depends="init" description="Compiles source." >
@@ -49,7 +68,9 @@
</condition>
</fail>
- <echo>Compiling ${javac.srcdir}, classpath: ${toString:javac.custom.classpath}</echo>
+ <echo>
+ Compiling ${javac.srcdir}, classpath: ${toString:javac.custom.classpath}
+ </echo>
<javac
srcdir="${javac.srcdir}"
@@ -63,8 +84,10 @@
<target name="dist" depends="compile"
description="Generate chromium_${PACKAGE_NAME}.jar.">
<!-- Create the distribution directory -->
- <mkdir dir="${lib.dir}" />
- <jar jarfile="${lib.dir}/chromium_${PACKAGE_NAME}.jar" basedir="${dest.dir}"/>
+ <jar
+ jarfile="${lib.dir}/chromium_${PACKAGE_NAME}.jar"
+ basedir="${dest.dir}"
+ />
<!-- If Gyp thinks this output is stale but Ant doesn't, the modification
time should still be updated. Otherwise, this target will continue to
« 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