OLD | NEW |
1 <!-- Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 <!-- |
2 | 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="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 --> | |
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"/> | |
15 <property name="build" location="build"/> | |
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"/> | |
19 | 10 |
20 <condition property="location.base" | 11 <import file="../../../../build/android/ant/chromium-jars.xml"/> |
21 value="${sdk.dir}" | |
22 else="${sdk.dir}/platforms/android-${sdk.version}"> | |
23 <isset property="env.ANDROID_BUILD_TOP"/> | |
24 </condition> | |
25 | 12 |
26 <target name="init"> | 13 <path id="javac.custom.classpath"> |
27 <!-- Create the time stamp --> | 14 <pathelement location="${location.base}/android.jar"/> |
28 <tstamp/> | 15 <pathelement location="${lib.dir}/chromium_base.jar"/> |
29 <!-- Create the build directory structure used by compile --> | 16 </path> |
30 <mkdir dir="${out.dir}"/> | |
31 <mkdir dir="${dest.dir}"/> | |
32 </target> | |
33 | |
34 <target name="compile" depends="init" | |
35 description="compile the source " > | |
36 <!-- Compile the java code from ${src} into ${dest.dir} --> | |
37 <javac srcdir="${src}" destdir="${dest.dir}" debug="true" includeantruntime=
"false"> | |
38 <classpath> | |
39 <pathelement path="${location.base}/android.jar" /> | |
40 <pathelement path="${out.dir}/chromium_base.jar" /> | |
41 </classpath> | |
42 </javac> | |
43 </target> | |
44 | |
45 <target name="dist" depends="compile" | |
46 description="generate the distribution" > | |
47 <!-- Create the distribution directory --> | |
48 <mkdir dir="${out.dir}"/> | |
49 | |
50 <!-- Put everything in ${build} into the chromium_media.jar file --> | |
51 <jar jarfile="${out.dir}/chromium_media.jar" basedir="${dest.dir}"/> | |
52 </target> | |
53 | |
54 <target name="clean" | |
55 description="clean up" > | |
56 <!-- Delete the appropriate directory trees --> | |
57 <delete dir="${dest.dir}"/> | |
58 <delete dir="${dist}"/> | |
59 </target> | |
60 </project> | 17 </project> |
OLD | NEW |