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="ContentShell" default="debug" basedir="."> | 7 <project name="ContentShell" default="debug" basedir="."> |
8 <description> | 8 <description> |
9 Building ContentShell.apk | 9 Building ContentShell.apk |
10 </description> | 10 </description> |
11 <import file="../../../../build/android/ant/common.xml"/> | 11 <import file="../../../../build/android/ant/common.xml"/> |
12 | 12 |
13 <!-- Convert the buildtype to lowercase. E.g Debug -> debug, Release -> releas
e. --> | 13 <!-- |
| 14 Convert the buildtype to lowercase. E.g Debug -> debug, |
| 15 Release -> release. |
| 16 --> |
14 <script language="javascript"> | 17 <script language="javascript"> |
15 project.setProperty("configuration.name", | 18 project.setProperty("configuration.name", |
16 project.getProperty("CONFIGURATION_NAME").toLowerCase()) | 19 project.getProperty("CONFIGURATION_NAME").toLowerCase()) |
17 </script> | 20 </script> |
18 <property-value name="target.abi" value="${APP_ABI}"/> | 21 <property-value name="target.abi" value="${APP_ABI}"/> |
19 <property-location name="out.dir" location="${PRODUCT_DIR}/content_shell" | 22 <property-location name="out.dir" location="${PRODUCT_DIR}/content_shell" |
20 check-exists="false"/> | 23 check-exists="false"/> |
21 <property name="resource.absolute.dir" value="${RESOURCE_DIR}"/> | 24 <property name="resource.absolute.dir" value="${RESOURCE_DIR}"/> |
22 <property name="gen.absolute.dir" value="${out.dir}/gen"/> | 25 <property name="gen.absolute.dir" value="${out.dir}/gen"/> |
23 <property name="jar.libs.dir" value="${out.dir}/java/libs"/> | |
24 <path id="native.libs.gdbserver"> | 26 <path id="native.libs.gdbserver"> |
25 <fileset file="${android.gdbserver}"/> | 27 <fileset file="${android.gdbserver}"/> |
26 </path> | 28 </path> |
27 <property name="native.libs.absolute.dir" location="${out.dir}/libs"/> | 29 <property name="native.libs.absolute.dir" location="${out.dir}/libs"/> |
28 <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"/> |
29 | 35 |
30 <path id="out.dex.jar.input.ref"> | 36 <path id="out.dex.jar.input.ref"> |
31 <filelist files="${INPUT_JARS_PATHS}"/> | 37 <filelist files="${INPUT_JARS_PATHS}"/> |
32 </path> | 38 </path> |
33 <property name="java.compilerargs" value="-classpath ${toString:out.dex.jar.in
put.ref}"/> | |
34 | |
35 <echo>resources: ${RESOURCE_DIR} classpath: ${toString:out.dex.jar.input.ref}<
/echo> | 39 <echo>resources: ${RESOURCE_DIR} classpath: ${toString:out.dex.jar.input.ref}<
/echo> |
36 | |
37 <!-- We expect PRODUCT_DIR to be set like the gyp var (e.g. $ROOT/out/Debug) -
-> | |
38 <fail message="PRODUCT_DIR env var not set?"> | |
39 <condition> | |
40 <not> | |
41 <isset property="PRODUCT_DIR"/> | |
42 </not> | |
43 </condition> | |
44 </fail> | |
45 | |
46 <target name="-post-compile"> | 40 <target name="-post-compile"> |
47 <!-- | 41 <!-- |
48 Copy gdbserver to main libs directory if building debug. | 42 Copy gdbserver to main libs directory if building debug. |
49 TODO(jrg): for now, Chrome on Android always builds native code | 43 TODO(jrg): for now, Chrome on Android always builds native code |
50 as Release and java/ant as Debug, which means we always install | 44 as Release and java/ant as Debug, which means we always install |
51 gdbserver. Resolve this discrepancy, possibly by making this | 45 gdbserver. Resolve this discrepancy, possibly by making this |
52 Release Official build java/ant as Release. | 46 Release Official build java/ant as Release. |
53 --> | 47 --> |
54 <if> | 48 <if> |
55 <condition> | 49 <condition> |
56 <equals arg1="${build.target}" arg2="debug"/> | 50 <equals arg1="${build.target}" arg2="debug"/> |
57 </condition> | 51 </condition> |
58 <then> | 52 <then> |
59 <echo message="Copying gdbserver to the apk to enable native debugging"
/> | 53 <echo message="Copying gdbserver to the apk to enable native debugging"/
> |
60 <copy todir="${out.dir}/libs/${target.abi}"> | 54 <copy todir="${out.dir}/libs/${target.abi}"> |
61 <path refid="native.libs.gdbserver"/> | 55 <path refid="native.libs.gdbserver"/> |
62 </copy> | 56 </copy> |
63 </then> | 57 </then> |
64 </if> | 58 </if> |
65 </target> | 59 </target> |
66 | 60 |
67 <!-- Classpath for javac --> | 61 <!-- Classpath for javac --> |
68 <path id="javac.custom.classpath"> | 62 <path id="javac.custom.classpath"> |
69 <path refid="out.dex.jar.input.ref"/> | 63 <path refid="out.dex.jar.input.ref"/> |
70 </path> | 64 </path> |
71 | 65 |
72 <import file="../../../../build/android/ant/sdk-targets.xml"/> | 66 <import file="../../../../build/android/ant/sdk-targets.xml"/> |
73 <import file="${sdk.dir}/tools/ant/build.xml"/> | 67 <import file="${sdk.dir}/tools/ant/build.xml"/> |
74 </project> | 68 </project> |
OLD | NEW |