OLD | NEW |
1 <?xml version="1.0" encoding="UTF-8"?> | 1 <?xml version="1.0" encoding="UTF-8"?> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 <project name="AndroidWebView" default="debug" basedir="."> | 7 <project name="AndroidWebView" default="debug" basedir="."> |
8 <description> | 8 <description> |
9 Building AndroidWebView.apk | 9 Building AndroidWebView.apk |
10 </description> | 10 </description> |
11 <import file="../../build/android/ant/common.xml"/> | 11 <import file="../../build/android/ant/common.xml"/> |
12 | 12 |
| 13 <!-- |
| 14 Convert the buildtype to lowercase. E.g Debug -> debug, |
| 15 Release -> release. |
| 16 --> |
| 17 <script language="javascript"> |
| 18 project.setProperty("configuration.name", |
| 19 project.getProperty("CONFIGURATION_NAME").toLowerCase()) |
| 20 </script> |
13 <property-value name="target.abi" value="${APP_ABI}"/> | 21 <property-value name="target.abi" value="${APP_ABI}"/> |
14 <property-location name="out.dir" location="${PRODUCT_DIR}/android_webview" | 22 <property-location name="out.dir" location="${PRODUCT_DIR}/android_webview" |
15 check-exists="false"/> | 23 check-exists="false"/> |
16 <property name="resource.absolute.dir" value="../res"/> | 24 <property name="resource.absolute.dir" value="${RESOURCE_DIR}"/> |
17 <property name="gen.absolute.dir" value="${out.dir}/gen"/> | 25 <property name="gen.absolute.dir" value="${out.dir}/gen"/> |
18 <property name="jar.libs.dir" value="${out.dir}/java/libs"/> | 26 <path id="native.libs.gdbserver"> |
| 27 <fileset file="${android.gdbserver}"/> |
| 28 </path> |
19 <property name="native.libs.absolute.dir" location="${out.dir}/libs"/> | 29 <property name="native.libs.absolute.dir" location="${out.dir}/libs"/> |
20 <property name="asset.absolute.dir" location="${out.dir}/assets"/> | 30 <property name="asset.absolute.dir" location="${out.dir}/assets"/> |
| 31 <!-- Set the output directory for the final apk to the ${apks.dir}. --> |
| 32 <property-location name="out.final.file" |
| 33 location="${apks.dir}/${ant.project.name}-debug.apk" |
| 34 check-exists="false"/> |
21 | 35 |
22 <path id="out.dex.jar.input.ref"> | 36 <path id="out.dex.jar.input.ref"> |
23 <fileset file="${out.dir}/java/libs/chromium_base.jar"/> | 37 <filelist files="${INPUT_JARS_PATHS}"/> |
24 <fileset file="${out.dir}/java/libs/chromium_chrome.jar"/> | |
25 <fileset file="${out.dir}/java/libs/chromium_content.jar"/> | |
26 <fileset file="${out.dir}/java/libs/chromium_media.jar"/> | |
27 <fileset file="${out.dir}/java/libs/chromium_net.jar"/> | |
28 <fileset file="${out.dir}/java/libs/chromium_ui.jar"/> | |
29 <fileset file="${out.dir}/java/libs/chromium_web_contents_delegate_android.j
ar"/> | |
30 </path> | 38 </path> |
31 <property name="java.compilerargs" value="-classpath ${toString:out.dex.jar.in
put.ref}"/> | 39 <echo>resources: ${RESOURCE_DIR} classpath: ${toString:out.dex.jar.input.ref}<
/echo> |
32 | 40 <target name="-post-compile"> |
33 <!-- We expect PRODUCT_DIR to be set like the gyp var (e.g. $ROOT/out/Debug) -
-> | 41 <!-- |
34 <fail message="PRODUCT_DIR env var not set?"> | 42 Copy gdbserver to main libs directory if building debug. |
35 <condition> | 43 TODO(jrg): for now, Chrome on Android always builds native code |
36 <not> | 44 as Release and java/ant as Debug, which means we always install |
37 <isset property="PRODUCT_DIR"/> | 45 gdbserver. Resolve this discrepancy, possibly by making this |
38 </not> | 46 Release Official build java/ant as Release. |
39 </condition> | 47 --> |
40 </fail> | 48 <if> |
| 49 <condition> |
| 50 <equals arg1="${build.target}" arg2="debug"/> |
| 51 </condition> |
| 52 <then> |
| 53 <echo message="Copying gdbserver to the apk to enable native debugging"/
> |
| 54 <copy todir="${out.dir}/libs/${target.abi}"> |
| 55 <path refid="native.libs.gdbserver"/> |
| 56 </copy> |
| 57 </then> |
| 58 </if> |
| 59 </target> |
41 | 60 |
42 <!-- Classpath for javac --> | 61 <!-- Classpath for javac --> |
43 <path id="javac.custom.classpath"> | 62 <path id="javac.custom.classpath"> |
44 <path refid="out.dex.jar.input.ref"/> | 63 <path refid="out.dex.jar.input.ref"/> |
45 </path> | 64 </path> |
| 65 |
46 <import file="../../build/android/ant/sdk-targets.xml"/> | 66 <import file="../../build/android/ant/sdk-targets.xml"/> |
47 <import file="${sdk.dir}/tools/ant/build.xml"/> | 67 <import file="${sdk.dir}/tools/ant/build.xml"/> |
48 </project> | 68 </project> |
OLD | NEW |