<?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>
(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"/>
<condition property="external.jars.dir"
value="${out.dir}/java/libs"
else="">
<available file="${out.dir}/java/libs" type="dir"/>
</condition>
<path id="out.dex.jar.input.ref">
<fileset dir="${external.jars.dir}" includes="*.jar"/>
</path>
<condition property="java.compilerargs"
value="-classpath ${toString:out.dex.jar.input.ref}">
<not>
<equals arg1="${external.jars.dir}" arg2=""/>
</not>
</condition>
<property name="native.libs.absolute.dir" location="${out.dir}/libs" />
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">
<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>