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

Side by Side Diff: build/android/ant/chromium-jars.xml

Issue 10831227: Make jars build from a single ant .xml template (Closed) Base URL: http://git.chromium.org/chromium/src.git@ant_aidl
Patch Set: Created 8 years, 4 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 unified diff | Download patch
OLDNEW
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.gyp action. This action will set PACKAGE_NAME. 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 chromium_${PACKAGE_NAME} in
12 ${PRODUCT_DIR}/lib.java. 12 ${PRODUCT_DIR}/lib.java.
13 2. Set javac.custom.classpath to classpath to use for javac.
14 3. Override javac.srcdir for providing custom source directory for javac.
15 --> 13 -->
14 <description>
15 Building ${PROJECT_NAME}/ java source code with ant.
16 </description>
16 17
17 <import file="common.xml"/> 18 <import file="common.xml"/>
18 <property-location name="src" location="src"/> 19
20 <path id="javac.custom.classpath">
21 <filelist dir="/" files="${INPUT_JARS_PATHS}"/>
22 <pathelement location="${ANDROID_SDK}/android.jar" />
23 </path>
24
25 <path id="javac.srcdirs.additional">
26 <filelist dir="/" files="${ADDITIONAL_SRC_DIRS}" />
27 </path>
28
29 <property-value name="javac.srcdir" value="src:${toString:javac.srcdirs.additi onal}"/>
30
19 <property-location name="lib.dir" location="${PRODUCT_DIR}/lib.java" 31 <property-location name="lib.dir" location="${PRODUCT_DIR}/lib.java"
20 check-exists="false"/> 32 check-exists="false"/>
21 <property-location name="dest.dir" location="${PRODUCT_DIR}/java/${PACKAGE_NAM E}" 33 <property-location name="dest.dir" location="${PRODUCT_DIR}/java/${PACKAGE_NAM E}"
22 check-exists="false"/> 34 check-exists="false"/>
23 35
24 <target name="init"> 36 <target name="init">
25 <!-- Create the time stamp --> 37 <!-- Create the time stamp -->
26 <tstamp/> 38 <tstamp/>
27 <!-- Create the build directory structure used by compile --> 39 <!-- Create the build directory structure used by compile -->
28 <mkdir dir="${lib.dir}"/> 40 <mkdir dir="${lib.dir}"/>
29 <mkdir dir="${dest.dir}"/> 41 <mkdir dir="${dest.dir}"/>
30 </target> 42 </target>
31 43
32 <!--
33 Compile target for jars. Requires javac.custom.classpath to be set.
34 Optionally javac.srcdir can be overridden to custom path for src
35 directories.
36 -->
37 <target name="compile" depends="init" description="Compiles source." > 44 <target name="compile" depends="init" description="Compiles source." >
38 <fail message="Error: javac.custom.classpath is not set. Please set it to 45 <fail message="Error: javac.custom.classpath is not set. Please set it to
39 classpath for javac."> 46 classpath for javac.">
40 <condition> 47 <condition>
41 <not><isreference refid="javac.custom.classpath"/></not> 48 <not><isreference refid="javac.custom.classpath"/></not>
42 </condition> 49 </condition>
43 </fail> 50 </fail>
44 <property-value name="javac.srcdir" value ="${src}"/> 51
45 <echo>Compiling ${javac.srcdir}, classpath: ${toString:javac.custom.classpat h}</echo> 52 <echo>Compiling ${javac.srcdir}, classpath: ${toString:javac.custom.classpat h}</echo>
46 <javac srcdir="${javac.srcdir}" destdir="${dest.dir}" debug="true" includean truntime="false"> 53
47 <classpath> 54 <javac
48 <path refid="javac.custom.classpath" /> 55 srcdir="${javac.srcdir}"
49 </classpath> 56 destdir="${dest.dir}"
50 </javac> 57 classpathref="javac.custom.classpath"
58 debug="true"
59 includeantruntime="false"
60 />
51 </target> 61 </target>
52 62
53 <target name="dist" depends="compile" 63 <target name="dist" depends="compile"
54 description="Generate chromium_${PACKAGE_NAME}.jar."> 64 description="Generate chromium_${PACKAGE_NAME}.jar.">
55 <!-- Create the distribution directory --> 65 <!-- Create the distribution directory -->
56 <mkdir dir="${lib.dir}" /> 66 <mkdir dir="${lib.dir}" />
57 <jar jarfile="${lib.dir}/chromium_${PACKAGE_NAME}.jar" basedir="${dest.dir}" /> 67 <jar jarfile="${lib.dir}/chromium_${PACKAGE_NAME}.jar" basedir="${dest.dir}" />
58 </target> 68 </target>
59 69
60 <target name="clean" description="clean up"> 70 <target name="clean" description="clean up">
61 <!-- Delete the appropriate directory trees --> 71 <!-- Delete the appropriate directory trees -->
62 <delete dir="${dest.dir}" /> 72 <delete dir="${dest.dir}" />
63 </target> 73 </target>
64 </project> 74 </project>
OLDNEW
« no previous file with comments | « base/android/javatests/base_javatests.xml ('k') | build/java.gypi » ('j') | build/java.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698