| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| |
| <project name="replaceme" default="debug" basedir="."> |
| |
| <description> |
| Building native test runner ChromeNativeTests_replaceme.apk |
| </description> |
| |
| <!-- |
| TODO(beverloo): Remove this property when all gyp files (also those in |
| WebKit) define the CHROMIUM_SRC property. This works because properties |
| in ant files are immutable. |
| --> |
| <property name="CHROMIUM_SRC" value="${PRODUCT_DIR}/../.." /> |
| |
| <import file="${CHROMIUM_SRC}/build/android/ant/common.xml"/> |
| |
| <!-- |
| TODO(yfriedman): Remove the need to specify this. We should generate the packages in a way such |
| that it's not required. |
| --> |
| <property name="source.absolute.dir" value="java/src"/> |
| <path id="javac.custom.classpath"> |
| <pathelement location="${ANDROID_SDK}/android.jar" /> |
| </path> |
| <property name="target.abi" value="${APP_ABI}"/> |
| |
| <path id="native.libs.gdbserver"> |
| <fileset file="${android.gdbserver}"/> |
| </path> |
| |
| <!-- We expect PRODUCT_DIR to be set like the gyp var |
| (e.g. $ROOT/out/Debug) --> |
| <fail message="PRODUCT_DIR env var not set?"> |
| <condition> |
| <not> |
| <isset property="PRODUCT_DIR"/> |
| </not> |
| </condition> |
| </fail> |
| |
| <property name="out.dir" location="${PRODUCT_DIR}/replaceme_apk"/> |
| |
| <property name="resource.absolute.dir" value="res"/> |
| <property name="gen.absolute.dir" value="${out.dir}/gen"/> |
| |
| <path id="out.dex.jar.input.ref"> |
| <filelist files="${INPUT_JARS_PATHS}"/> |
| </path> |
| <condition property="java.compilerargs" |
| value="-classpath ${toString:out.dex.jar.input.ref}"> |
| <not> |
| <equals arg1="${toString:out.dex.jar.input.ref}" arg2=""/> |
| </not> |
| </condition> |
| <property name="native.libs.absolute.dir" location="${out.dir}/libs" /> |
| |
| <!-- Copy the below manifest file to a new directory because the project |
| base directory and output directory are the same and manifest merge |
| task takes the same file as source and target when doing copying. |
| Otherwise it'll generate an empty manifest file. --> |
| <copy file="AndroidManifest.xml" todir="${out.dir}/manifest"/> |
| <property name="manifest.abs.file" location="${out.dir}/manifest/AndroidManifest.xml"/> |
| |
| <target name="-post-compile"> |
| <!-- copy gdbserver to main libs directory if building debug. --> |
| <if> |
| <condition> |
| <equals arg1="${build.target}" arg2="debug" /> |
| </condition> |
| <then> |
| <echo message="Copying gdbserver to the apk to enable native debugging"/> |
| <copy todir="${out.dir}/libs/${target.abi}"> |
| <path refid="native.libs.gdbserver"/> |
| </copy> |
| </then> |
| </if> |
| </target> |
| |
| <import file="${CHROMIUM_SRC}/build/android/ant/sdk-targets.xml"/> |
| <import file="${sdk.dir}/tools/ant/build.xml" /> |
| |
| </project> |