OLD | NEW |
1 <!-- Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 <!-- Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 | 2 |
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="ContentJavaTests" default="dist" basedir="."> | 6 <project name="ContentJavaTests" default="dist" basedir="."> |
7 <description> | 7 <description> |
8 building content-only instrumentation tests with ant | 8 building content-only instrumentation tests with ant |
9 </description> | 9 </description> |
10 <!-- set global properties for this build --> | 10 <!-- set global properties for this build --> |
11 <property environment="env"/> | |
12 <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/> | |
13 <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/> | |
14 <property name="src" location="src"/> | 11 <property name="src" location="src"/> |
15 <property name="out.dir" location="${PRODUCT_DIR}/lib.java"/> | 12 <property name="out.dir" location="${PRODUCT_DIR}/lib.java"/> |
16 <property name="classes.dir" location="${PRODUCT_DIR}/java/${PACKAGE_NAME}"/> | 13 <property name="classes.dir" location="${PRODUCT_DIR}/java/${PACKAGE_NAME}"/> |
17 <property name="jar.dir" location="${out.dir}"/> | 14 <property name="jar.dir" location="${out.dir}"/> |
18 | 15 |
19 <condition property="location.base" | |
20 value="${sdk.dir}" | |
21 else="${sdk.dir}/platforms/android-${sdk.version}"> | |
22 <isset property="env.ANDROID_BUILD_TOP"/> | |
23 </condition> | |
24 | |
25 <target name="init"> | 16 <target name="init"> |
26 <!-- Create the time stamp --> | 17 <!-- Create the time stamp --> |
27 <tstamp/> | 18 <tstamp/> |
28 <!-- Create the build directory structure used by compile --> | 19 <!-- Create the build directory structure used by compile --> |
29 <mkdir dir="${out.dir}"/> | 20 <mkdir dir="${out.dir}"/> |
30 </target> | 21 </target> |
31 | 22 |
32 <target name="compile" depends="init" | 23 <target name="compile" depends="init" |
33 description="compile the source " > | 24 description="compile the source " > |
34 <!-- Create the classes output directory --> | 25 <!-- Create the classes output directory --> |
35 <mkdir dir="${classes.dir}"/> | 26 <mkdir dir="${classes.dir}"/> |
36 | 27 |
37 <!-- Compile the java code from ${src} into ${classes.dir} --> | 28 <!-- Compile the java code from ${src} into ${classes.dir} --> |
38 <!-- Gyp target should have compiled aidl files into java source files in | 29 <!-- Gyp target should have compiled aidl files into java source files in |
39 lib.jar (see content.gyp:common_aidl). --> | 30 lib.jar (see content.gyp:common_aidl). --> |
40 <javac srcdir="${src}" destdir="${classes.dir}" debug="true" includeantrunti
me="false"> | 31 <javac srcdir="${src}" destdir="${classes.dir}" debug="true" includeantrunti
me="false"> |
41 <classpath> | 32 <classpath> |
42 <pathelement path="${location.base}/android.jar" /> | 33 <pathelement path="${ANDROID_SDK}/android.jar" /> |
43 <pathelement path="${jar.dir}/chromium_base.jar" /> | 34 <pathelement path="${jar.dir}/chromium_base.jar" /> |
44 <pathelement path="${jar.dir}/chromium_base_javatests.jar" /> | 35 <pathelement path="${jar.dir}/chromium_base_javatests.jar" /> |
45 <pathelement path="${jar.dir}/chromium_content.jar" /> | 36 <pathelement path="${jar.dir}/chromium_content.jar" /> |
46 </classpath> | 37 </classpath> |
47 </javac> | 38 </javac> |
48 </target> | 39 </target> |
49 | 40 |
50 <target name="dist" depends="compile" | 41 <target name="dist" depends="compile" |
51 description="generate the distribution" > | 42 description="generate the distribution" > |
52 <!-- Create the distribution directory --> | 43 <!-- Create the distribution directory --> |
53 <mkdir dir="${jar.dir}"/> | 44 <mkdir dir="${jar.dir}"/> |
54 | 45 |
55 <!-- Put everything in ${classes.dir} into the chromium_content_tests.jar fi
le --> | 46 <!-- Put everything in ${classes.dir} into the chromium_content_tests.jar fi
le --> |
56 <jar jarfile="${jar.dir}/chromium_${PACKAGE_NAME}.jar" basedir="${classes.di
r}"/> | 47 <jar jarfile="${jar.dir}/chromium_${PACKAGE_NAME}.jar" basedir="${classes.di
r}"/> |
57 </target> | 48 </target> |
58 | 49 |
59 <target name="clean" description="clean up" > | 50 <target name="clean" description="clean up" > |
60 <!-- Delete the generated content --> | 51 <!-- Delete the generated content --> |
61 <delete dir="${classes.dir}"/> | 52 <delete dir="${classes.dir}"/> |
62 <delete file="${jar.dir}/chromium_${PACKAGE_NAME}.jar"/> | 53 <delete file="${jar.dir}/chromium_${PACKAGE_NAME}.jar"/> |
63 </target> | 54 </target> |
64 </project> | 55 </project> |
OLD | NEW |