Chromium Code Reviews| 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 <import file="../../../../build/android/ant/sdk-targets.xml"/> | 14 <import file="../../../../build/android/ant/sdk-targets.xml"/> |
| 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 name="out.dir" location="${PRODUCT_DIR}/content_shell_test"/> |
| 17 <property name="resource.absolute.dir" value="../res"/> | 17 <property name="resource.absolute.dir" value="../res"/> |
| 18 <property name="gen.absolute.dir" value="${out.dir}/gen"/> | 18 <property name="gen.absolute.dir" value="${out.dir}/gen"/> |
| 19 <path id="native.libs.gdbserver"> | |
| 20 <fileset file="${android.gdbserver}"/> | |
| 21 </path> | |
| 22 <property name="native.libs.absolute.dir" location="${out.dir}/libs" /> | 19 <property name="native.libs.absolute.dir" location="${out.dir}/libs" /> |
| 23 <property name="asset.absolute.dir" location="${out.dir}/assets" /> | 20 <property name="asset.absolute.dir" location="${out.dir}/assets" /> |
| 24 | 21 <!-- Set the output directory for the final apk to the ${apks.dir} --> |
|
cjhopman
2012/09/06 22:33:41
Nit: full stop.
shashi
2012/09/07 00:41:33
Done.
| |
| 25 <path id="out.dex.jar.input.ref"> | 22 <property-location name="out.final.file" location="${apks.dir}/${ant.project.n ame}-debug.apk" |
| 26 <pathelement location="${PRODUCT_DIR}/lib.java/chromium_base.jar"/> | 23 check-exists="false" /> |
| 27 <pathelement location="${PRODUCT_DIR}/lib.java/chromium_base_javatests.jar"/ > | 24 <property name="generate.test.jar" value="true" /> |
| 28 <pathelement location="${PRODUCT_DIR}/lib.java/chromium_content.jar"/> | |
| 29 <pathelement location="${PRODUCT_DIR}/lib.java/chromium_content_javatests.ja r"/> | |
| 30 <pathelement location="${PRODUCT_DIR}/lib.java/chromium_media.jar"/> | |
| 31 <pathelement location="${PRODUCT_DIR}/lib.java/chromium_net.jar"/> | |
| 32 <pathelement location="${PRODUCT_DIR}/lib.java/chromium_net_javatests.jar"/> | |
| 33 <pathelement location="${PRODUCT_DIR}/content_shell/classes"/> | |
| 34 </path> | |
| 35 <property name="java.compilerargs" value="-classpath ${toString:out.dex.jar.in put.ref}"/> | |
| 36 | |
| 37 <!-- We expect PRODUCT_DIR to be set like the gyp var | |
| 38 (e.g. $ROOT/out/Debug) --> | |
| 39 <fail message="PRODUCT_DIR env var not set?"> | |
| 40 <condition> | |
| 41 <not> | |
| 42 <isset property="PRODUCT_DIR"/> | |
| 43 </not> | |
| 44 </condition> | |
| 45 </fail> | |
| 46 | |
| 47 <target name="-post-compile"> | |
| 48 <!-- copy gdbserver to main libs directory if building debug. | |
| 49 TODO(jrg): for now, Chrome on Android always builds native code | |
| 50 as Release and java/ant as Debug, which means we always install | |
| 51 gdbserver. Resolve this discrepancy, possibly by making this | |
| 52 Release Official build java/ant as Release. --> | |
| 53 <if> | |
| 54 <condition> | |
| 55 <equals arg1="${build.target}" arg2="debug" /> | |
| 56 </condition> | |
| 57 <then> | |
| 58 <echo message="Copying gdbserver to the apk to enable native debugging"/ > | |
| 59 <copy todir="${out.dir}/libs/${target.abi}"> | |
| 60 <path refid="native.libs.gdbserver"/> | |
| 61 </copy> | |
| 62 </then> | |
| 63 </if> | |
| 64 | |
| 65 <!-- We also want a .jar as well as an .apk for ContentShellTest-debug | |
| 66 so that proguard can be used to list the tests by annotation. --> | |
| 67 <jar destfile="${out.dir}/${ant.project.name}-debug.jar"> | |
| 68 <fileset dir="${out.dir}/classes" includes="**/*.class"/> | |
| 69 <zipfileset | |
| 70 includes="**/*.class" | |
| 71 src="${PRODUCT_DIR}/lib.java/chromium_content_javatests.jar"/> | |
| 72 <zipfileset | |
| 73 includes="**/*.class" | |
| 74 src="${PRODUCT_DIR}/lib.java/chromium_net_javatests.jar"/> | |
| 75 </jar> | |
| 76 | |
| 77 </target> | |
| 78 | 25 |
| 79 <!-- Classpath for javac --> | 26 <!-- Classpath for javac --> |
| 80 <path id="javac.custom.classpath"> | 27 <path id="javac.custom.classpath"> |
| 81 <path refid="out.dex.jar.input.ref"/> | 28 <fileset file="${lib.java.dir}/chromium_base_javatests.jar"/> |
| 29 <fileset file="${lib.java.dir}/chromium_content_javatests.jar"/> | |
| 30 <fileset file="${lib.java.dir}/chromium_net_javatests.jar"/> | |
| 31 <fileset file="${lib.java.dir}/chromium_media.jar"/> | |
| 32 <fileset file="${test.lib.java.dir}/ContentShell-debug.jar"/> | |
| 82 </path> | 33 </path> |
| 34 | |
| 35 <!-- Use the output jar for dex, this jar contains all the compiled | |
| 36 classes as well as classes from included jars. | |
| 37 --> | |
| 38 <path id="out.dex.jar.input.ref"> | |
| 39 <fileset file="${test.lib.java.dir}/ContentShellTest-debug.jar"/> | |
| 40 </path> | |
| 41 <!-- Set the classes directory to null, to avoid including compiled | |
| 42 classes, the compiled classes are already included in generated | |
| 43 {ant.project.name)-debug.jar file. | |
| 44 --> | |
| 45 <property name="out.dex.input.absolute.dir" value="" /> | |
| 46 | |
| 83 <import file="${sdk.dir}/tools/ant/build.xml" /> | 47 <import file="${sdk.dir}/tools/ant/build.xml" /> |
| 84 | |
| 85 </project> | 48 </project> |
| OLD | NEW |