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="Media" default="dist" basedir="."> | 6 <project name="Media" default="dist" basedir="."> |
7 <description> | 7 <description> |
8 building media java source code with ant | 8 building media java source code with ant |
9 </description> | 9 </description> |
10 <!-- set global properties for this build --> | 10 <!-- set global properties for this build --> |
11 <property environment="env"/> | 11 <property environment="env"/> |
12 <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/> | 12 <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/> |
13 <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/> | 13 <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/> |
14 <property name="src" location="."/> | 14 <property name="src" location="."/> |
15 <property name="build" location="build"/> | 15 <property name="build" location="build"/> |
16 <property name="dist" location="dist"/> | 16 <property name="dist" location="dist"/> |
| 17 <property name="out.dir" location="${PRODUCT_DIR}/lib.java"/> |
| 18 <property name="dest.dir" location="${PRODUCT_DIR}/java/media"/> |
17 | 19 |
18 <condition property="location.base" | 20 <condition property="location.base" |
19 value="${sdk.dir}" | 21 value="${sdk.dir}" |
20 else="${sdk.dir}/platforms/android-${sdk.version}"> | 22 else="${sdk.dir}/platforms/android-${sdk.version}"> |
21 <isset property="env.ANDROID_BUILD_TOP"/> | 23 <isset property="env.ANDROID_BUILD_TOP"/> |
22 </condition> | 24 </condition> |
23 | 25 |
24 <target name="init"> | 26 <target name="init"> |
25 <!-- Create the time stamp --> | 27 <!-- Create the time stamp --> |
26 <tstamp/> | 28 <tstamp/> |
27 <!-- Create the build directory structure used by compile --> | 29 <!-- Create the build directory structure used by compile --> |
28 <mkdir dir="${build}"/> | 30 <mkdir dir="${out.dir}"/> |
| 31 <mkdir dir="${dest.dir}"/> |
29 </target> | 32 </target> |
30 | 33 |
31 <target name="compile" depends="init" | 34 <target name="compile" depends="init" |
32 description="compile the source " > | 35 description="compile the source " > |
33 <!-- Compile the java code from ${src} into ${build} --> | 36 <!-- Compile the java code from ${src} into ${dest.dir} --> |
34 <javac srcdir="${src}" destdir="${build}"> | 37 <javac srcdir="${src}" destdir="${dest.dir}"> |
35 <classpath> | 38 <classpath> |
36 <path location="${location.base}/android.jar"/> | 39 <pathelement path="${location.base}/android.jar" /> |
| 40 <pathelement path="${out.dir}/chromium_base.jar" /> |
37 </classpath> | 41 </classpath> |
38 </javac> | 42 </javac> |
39 </target> | 43 </target> |
40 | 44 |
41 <target name="dist" depends="compile" | 45 <target name="dist" depends="compile" |
42 description="generate the distribution" > | 46 description="generate the distribution" > |
43 <!-- Create the distribution directory --> | 47 <!-- Create the distribution directory --> |
44 <mkdir dir="${dist}/lib"/> | 48 <mkdir dir="${dist}/lib"/> |
45 | 49 |
46 <!-- Put everything in ${build} into the chromium_media.jar file --> | 50 <!-- Put everything in ${build} into the chromium_media.jar file --> |
47 <jar jarfile="${dist}/lib/chromium_media.jar" basedir="${build}"/> | 51 <jar jarfile="${out.dir}/chromium_media.jar" basedir="${dest.dir}"/> |
48 </target> | 52 </target> |
49 | 53 |
50 <target name="clean" | 54 <target name="clean" |
51 description="clean up" > | 55 description="clean up" > |
52 <!-- Delete the ${build} and ${dist} directory trees --> | 56 <!-- Delete the appropriate directory trees --> |
53 <delete dir="${build}"/> | 57 <delete dir="${dest.dir}"/> |
54 <delete dir="${dist}"/> | 58 <delete dir="${dist}"/> |
55 </target> | 59 </target> |
56 </project> | 60 </project> |
OLD | NEW |