| 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. |
| 11 The jar will be created as chromium_${PACKAGE_NAME} in | 11 The jar will be created as ${JAR_NAME} in |
| 12 ${PRODUCT_DIR}/lib.java. | 12 ${PRODUCT_DIR}/lib.java. |
| 13 --> | 13 --> |
| 14 <description> | 14 <description> |
| 15 Building ${PROJECT_NAME}/ java source code with ant. | 15 Building ${PROJECT_NAME}/ java source code with ant. |
| 16 </description> | 16 </description> |
| 17 | 17 |
| 18 <import file="common.xml"/> | 18 <import file="common.xml"/> |
| 19 | 19 |
| 20 <path id="javac.custom.classpath"> | 20 <path id="javac.custom.classpath"> |
| 21 <filelist files="${INPUT_JARS_PATHS}"/> | 21 <filelist files="${INPUT_JARS_PATHS}"/> |
| 22 <pathelement location="${ANDROID_SDK}/android.jar"/> | 22 <pathelement location="${ANDROID_SDK}/android.jar"/> |
| 23 </path> | 23 </path> |
| 24 | 24 |
| 25 <path id="javac.srcdirs.additional"> | 25 <path id="javac.srcdirs.additional"> |
| 26 <filelist files="${ADDITIONAL_SRC_DIRS}"/> | 26 <filelist files="${ADDITIONAL_SRC_DIRS}"/> |
| 27 <filelist files="${GENERATED_SRC_DIRS}"/> | 27 <filelist files="${GENERATED_SRC_DIRS}"/> |
| 28 </path> | 28 </path> |
| 29 | 29 |
| 30 <property-value | 30 <property-value |
| 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/${TARGET_NAME}" |
| 38 check-exists="false" | 38 check-exists="false" |
| 39 /> | 39 /> |
| 40 | 40 |
| 41 <target name="init"> | 41 <target name="init"> |
| 42 <!-- Create the time stamp --> | 42 <!-- Create the time stamp --> |
| 43 <tstamp/> | 43 <tstamp/> |
| 44 <!-- Create the build directory structure used by compile --> | 44 <!-- Create the build directory structure used by compile --> |
| 45 <mkdir dir="${dest.dir}"/> | 45 <mkdir dir="${dest.dir}"/> |
| 46 | 46 |
| 47 <!-- Remove all .class files from dest.dir. This prevents inclusion of | 47 <!-- Remove all .class files from dest.dir. This prevents inclusion of |
| (...skipping 21 matching lines...) Expand all Loading... |
| 69 <javac | 69 <javac |
| 70 srcdir="${javac.srcdir}" | 70 srcdir="${javac.srcdir}" |
| 71 destdir="${dest.dir}" | 71 destdir="${dest.dir}" |
| 72 classpathref="javac.custom.classpath" | 72 classpathref="javac.custom.classpath" |
| 73 debug="true" | 73 debug="true" |
| 74 includeantruntime="false" | 74 includeantruntime="false" |
| 75 /> | 75 /> |
| 76 </target> | 76 </target> |
| 77 | 77 |
| 78 <target name="dist" depends="compile" | 78 <target name="dist" depends="compile" |
| 79 description="Generate chromium_${PACKAGE_NAME}.jar."> | 79 description="Generate ${JAR_NAME}."> |
| 80 <!-- Create the distribution directory --> | 80 <!-- Create the distribution directory --> |
| 81 <jar | 81 <jar |
| 82 jarfile="${lib.java.dir}/chromium_${PACKAGE_NAME}.jar" | 82 jarfile="${lib.java.dir}/${JAR_NAME}" |
| 83 basedir="${dest.dir}" | 83 basedir="${dest.dir}" |
| 84 /> | 84 /> |
| 85 | 85 |
| 86 <!-- If Gyp thinks this output is stale but Ant doesn't, the modification | 86 <!-- 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 | 87 time should still be updated. Otherwise, this target will continue to |
| 88 be rebuilt in future builds. | 88 be rebuilt in future builds. |
| 89 --> | 89 --> |
| 90 <touch file="${lib.java.dir}/chromium_${PACKAGE_NAME}.jar"/> | 90 <touch file="${lib.java.dir}/${JAR_NAME}"/> |
| 91 </target> | 91 </target> |
| 92 | 92 |
| 93 <target name="clean" description="clean up"> | 93 <target name="clean" description="clean up"> |
| 94 <!-- Delete the appropriate directory trees --> | 94 <!-- Delete the appropriate directory trees --> |
| 95 <delete dir="${dest.dir}"/> | 95 <delete dir="${dest.dir}"/> |
| 96 </target> | 96 </target> |
| 97 </project> | 97 </project> |
| OLD | NEW |