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