OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. | 4 found in the LICENSE file. |
5 --> | 5 --> |
6 <project name="chromium-jars" default="dist"> | 6 <project name="chromium-jars" default="dist"> |
7 <!-- | 7 <!-- |
8 Common ant build file for for chromium_*.jars. | 8 Common ant build file for for chromium_*.jars. |
9 For creating a new chromium_*.jar : | 9 For creating a new chromium_*.jar : |
10 1. Use build/java.gypi action. | 10 1. Use build/java.gypi action. |
(...skipping 20 matching lines...) Expand all Loading... |
31 name="javac.srcdir" | 31 name="javac.srcdir" |
32 value="src:${toString:javac.srcdirs.additional}" | 32 value="src:${toString:javac.srcdirs.additional}" |
33 /> | 33 /> |
34 | 34 |
35 <property-location | 35 <property-location |
36 name="dest.dir" | 36 name="dest.dir" |
37 location="${PRODUCT_DIR}/java/${PACKAGE_NAME}" | 37 location="${PRODUCT_DIR}/java/${PACKAGE_NAME}" |
38 check-exists="false" | 38 check-exists="false" |
39 /> | 39 /> |
40 | 40 |
| 41 <condition property="javac_includes_message" |
| 42 value="" |
| 43 else="Include filter: ${JAVAC_INCLUDES}"> |
| 44 <equals arg1="${JAVAC_INCLUDES}" arg2=""/> |
| 45 </condition> |
| 46 |
41 <target name="init"> | 47 <target name="init"> |
42 <!-- Create the time stamp --> | 48 <!-- Create the time stamp --> |
43 <tstamp/> | 49 <tstamp/> |
44 <!-- Create the build directory structure used by compile --> | 50 <!-- Create the build directory structure used by compile --> |
45 <mkdir dir="${dest.dir}"/> | 51 <mkdir dir="${dest.dir}"/> |
46 | 52 |
47 <!-- Remove all .class files from dest.dir. This prevents inclusion of | 53 <!-- Remove all .class files from dest.dir. This prevents inclusion of |
48 incorrect .class files in the final .jar. For example, if a .java file | 54 incorrect .class files in the final .jar. For example, if a .java file |
49 was deleted, the .jar should not contain the .class files for that | 55 was deleted, the .jar should not contain the .class files for that |
50 .java from previous builds. | 56 .java from previous builds. |
51 --> | 57 --> |
52 <delete> | 58 <delete> |
53 <fileset dir="${dest.dir}" includes="**/*.class"/> | 59 <fileset dir="${dest.dir}" includes="**/*.class"/> |
54 </delete> | 60 </delete> |
55 </target> | 61 </target> |
56 | 62 |
57 <target name="compile" depends="init" description="Compiles source."> | 63 <target name="compile" depends="init" description="Compiles source."> |
58 <fail message="Error: javac.custom.classpath is not set. Please set it to | 64 <fail message="Error: javac.custom.classpath is not set. Please set it to |
59 classpath for javac."> | 65 classpath for javac."> |
60 <condition> | 66 <condition> |
61 <not><isreference refid="javac.custom.classpath"/></not> | 67 <not><isreference refid="javac.custom.classpath"/></not> |
62 </condition> | 68 </condition> |
63 </fail> | 69 </fail> |
64 | 70 |
65 <echo> | 71 <echo> |
66 Compiling ${javac.srcdir}, classpath: ${toString:javac.custom.classpath} | 72 Compiling ${javac.srcdir}, classpath: ${toString:javac.custom.classpath} |
| 73 ${javac_includes_message} |
67 </echo> | 74 </echo> |
68 | 75 |
69 <javac | 76 <javac |
70 srcdir="${javac.srcdir}" | 77 srcdir="${javac.srcdir}" |
71 destdir="${dest.dir}" | 78 destdir="${dest.dir}" |
72 classpathref="javac.custom.classpath" | 79 classpathref="javac.custom.classpath" |
73 debug="true" | 80 debug="true" |
74 includeantruntime="false" | 81 includeantruntime="false" |
| 82 includes="${JAVAC_INCLUDES}" |
75 /> | 83 /> |
76 </target> | 84 </target> |
77 | 85 |
78 <target name="dist" depends="compile" | 86 <target name="dist" depends="compile" |
79 description="Generate chromium_${PACKAGE_NAME}.jar."> | 87 description="Generate chromium_${PACKAGE_NAME}.jar."> |
80 <!-- Create the distribution directory --> | 88 <!-- Create the distribution directory --> |
81 <jar | 89 <jar |
82 jarfile="${lib.java.dir}/chromium_${PACKAGE_NAME}.jar" | 90 jarfile="${lib.java.dir}/chromium_${PACKAGE_NAME}.jar" |
83 basedir="${dest.dir}" | 91 basedir="${dest.dir}" |
84 /> | 92 /> |
85 | 93 |
86 <!-- If Gyp thinks this output is stale but Ant doesn't, the modification | 94 <!-- If Gyp thinks this output is stale but Ant doesn't, the modification |
87 time should still be updated. Otherwise, this target will continue to | 95 time should still be updated. Otherwise, this target will continue to |
88 be rebuilt in future builds. | 96 be rebuilt in future builds. |
89 --> | 97 --> |
90 <touch file="${lib.java.dir}/chromium_${PACKAGE_NAME}.jar"/> | 98 <touch file="${lib.java.dir}/chromium_${PACKAGE_NAME}.jar"/> |
91 </target> | 99 </target> |
92 | 100 |
93 <target name="clean" description="clean up"> | 101 <target name="clean" description="clean up"> |
94 <!-- Delete the appropriate directory trees --> | 102 <!-- Delete the appropriate directory trees --> |
95 <delete dir="${dest.dir}"/> | 103 <delete dir="${dest.dir}"/> |
96 </target> | 104 </target> |
97 </project> | 105 </project> |
OLD | NEW |