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