| 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="ContentShellTest" default="debug" basedir="."> | 7 <project name="ContentShellTest" default="debug" basedir="."> |
| 8 | 8 |
| 9 <description> | 9 <description> |
| 10 Building ContentShellTest.apk | 10 Building ContentShellTest.apk |
| 11 </description> | 11 </description> |
| 12 | 12 |
| 13 <import file="../../../../build/android/ant/common.xml"/> | 13 <import file="../../../../build/android/ant/common.xml"/> |
| 14 | 14 |
| 15 <property name="target.abi" value="${APP_ABI}"/> | 15 <property-value name="target.abi" value="${APP_ABI}"/> |
| 16 <property name="out.dir" location="${PRODUCT_DIR}/content_shell_test"/> | 16 <property-location name="out.dir" location="${PRODUCT_DIR}/content_shell_test" |
| 17 check-exists="false"/> |
| 17 <property name="resource.absolute.dir" value="${RESOURCE_DIR}"/> | 18 <property name="resource.absolute.dir" value="${RESOURCE_DIR}"/> |
| 18 <property name="gen.absolute.dir" value="${out.dir}/gen"/> | 19 <property-value name="gen.absolute.dir" value="${out.dir}/gen"/> |
| 19 <path id="native.libs.gdbserver"> | 20 <property-location name="native.libs.absolute.dir" location="${out.dir}/libs" |
| 20 <fileset file="${android.gdbserver}"/> | 21 check-exists="false"/> |
| 21 </path> | 22 <property-location name="asset.absolute.dir" location="${out.dir}/assets" |
| 22 <property name="native.libs.absolute.dir" location="${out.dir}/libs" /> | 23 check-exists="false"/> |
| 23 <property name="asset.absolute.dir" location="${out.dir}/assets" /> | 24 <!-- Set the output directory for the final apk to the ${apks.dir}. --> |
| 25 <property-location name="out.final.file" |
| 26 location="${apks.dir}/${ant.project.name}-debug.apk" |
| 27 check-exists="false"/> |
| 28 <property name="generate.test.jar" value="true"/> |
| 29 |
| 30 <property-location name="contentshell.classes.dir" |
| 31 location="${PRODUCT_DIR}/content_shell/classes"/> |
| 24 | 32 |
| 25 <path id="out.dex.jar.input.ref"> | 33 <path id="out.dex.jar.input.ref"> |
| 26 <filelist files="${INPUT_JARS_PATHS}"/> | 34 <filelist files="${INPUT_JARS_PATHS}"/> |
| 27 <pathelement location="${PRODUCT_DIR}/content_shell/classes"/> | 35 <pathelement location="${contentshell.classes.dir}"/> |
| 28 </path> | 36 </path> |
| 29 <property name="java.compilerargs" value="-classpath ${toString:out.dex.jar.in
put.ref}"/> | |
| 30 | |
| 31 <!-- We expect PRODUCT_DIR to be set like the gyp var | |
| 32 (e.g. $ROOT/out/Debug) --> | |
| 33 <fail message="PRODUCT_DIR env var not set?"> | |
| 34 <condition> | |
| 35 <not> | |
| 36 <isset property="PRODUCT_DIR"/> | |
| 37 </not> | |
| 38 </condition> | |
| 39 </fail> | |
| 40 | |
| 41 <target name="-post-compile"> | |
| 42 <!-- copy gdbserver to main libs directory if building debug. | |
| 43 TODO(jrg): for now, Chrome on Android always builds native code | |
| 44 as Release and java/ant as Debug, which means we always install | |
| 45 gdbserver. Resolve this discrepancy, possibly by making this | |
| 46 Release Official build java/ant as Release. --> | |
| 47 <if> | |
| 48 <condition> | |
| 49 <equals arg1="${build.target}" arg2="debug" /> | |
| 50 </condition> | |
| 51 <then> | |
| 52 <echo message="Copying gdbserver to the apk to enable native debugging"/
> | |
| 53 <copy todir="${out.dir}/libs/${target.abi}"> | |
| 54 <path refid="native.libs.gdbserver"/> | |
| 55 </copy> | |
| 56 </then> | |
| 57 </if> | |
| 58 | |
| 59 <!-- We also want a .jar as well as an .apk for ContentShellTest-debug | |
| 60 so that proguard can be used to list the tests by annotation. --> | |
| 61 <jar destfile="${out.dir}/${ant.project.name}-debug.jar"> | |
| 62 <fileset dir="${out.dir}/classes" includes="**/*.class"/> | |
| 63 <zipfileset | |
| 64 includes="**/*.class" | |
| 65 src="${PRODUCT_DIR}/lib.java/chromium_content_javatests.jar"/> | |
| 66 <zipfileset | |
| 67 includes="**/*.class" | |
| 68 src="${PRODUCT_DIR}/lib.java/chromium_net_javatests.jar"/> | |
| 69 </jar> | |
| 70 | |
| 71 </target> | |
| 72 | 37 |
| 73 <!-- Classpath for javac --> | 38 <!-- Classpath for javac --> |
| 74 <path id="javac.custom.classpath"> | 39 <path id="javac.custom.classpath"> |
| 75 <path refid="out.dex.jar.input.ref"/> | 40 <path refid="out.dex.jar.input.ref"/> |
| 76 </path> | 41 </path> |
| 42 |
| 77 <import file="../../../../build/android/ant/sdk-targets.xml"/> | 43 <import file="../../../../build/android/ant/sdk-targets.xml"/> |
| 78 <import file="${sdk.dir}/tools/ant/build.xml" /> | 44 <import file="${sdk.dir}/tools/ant/build.xml"/> |
| 79 | |
| 80 </project> | 45 </project> |
| OLD | NEW |