blob: 545568d1dc27de55c8a6b6a81b88235249359553 [file] [log] [blame]
<?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=".">
Building native test runner ChromeNativeTests_replaceme.apk
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" />
<property name="target.abi" value="${APP_ABI}"/>
<path id="native.libs.gdbserver">
<fileset file="${android.gdbserver}"/>
<!-- We expect PRODUCT_DIR to be set like the gyp var
(e.g. $ROOT/out/Debug) -->
<fail message="PRODUCT_DIR env var not set?">
<isset property="PRODUCT_DIR"/>
<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}"/>
<condition property="java.compilerargs"
value="-classpath ${toString:out.dex.jar.input.ref}">
<equals arg1="${toString:out.dex.jar.input.ref}" arg2=""/>
<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. -->
<equals arg1="${}" arg2="debug" />
<echo message="Copying gdbserver to the apk to enable native debugging"/>
<copy todir="${out.dir}/libs/${target.abi}">
<path refid="native.libs.gdbserver"/>
<import file="${CHROMIUM_SRC}/build/android/ant/sdk-targets.xml"/>
<import file="${sdk.dir}/tools/ant/build.xml" />