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 | 7 |
8 <project name="replaceme" default="debug" basedir="."> | 8 <project name="replaceme" default="debug" basedir="."> |
9 | 9 |
10 <description> | 10 <description> |
11 Building native test runner ChromeNativeTests_replaceme.apk | 11 Building native test runner ChromeNativeTests_replaceme.apk |
12 </description> | 12 </description> |
13 | 13 |
14 <property environment="env"/> | 14 <property environment="env"/> |
15 <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/> | 15 <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/> |
16 <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/> | 16 <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/> |
17 <property name="src" location="."/> | 17 <property name="src" location="."/> |
18 | |
19 <!-- TODO(jrg): although the source.dir setting points the android | |
20 antfiles to the correct location for finding our java, and our jars | |
21 are rebuilt when the java changes, a re-javac does not trigger a | |
22 re-package of our apk. Fix. --> | |
23 <property name="source.dir" location="java"/> | 18 <property name="source.dir" location="java"/> |
24 | 19 |
25 <property name="target" value="android-${env.ANDROID_SDK_VERSION}"/> | 20 <property name="target" value="android-${env.ANDROID_SDK_VERSION}"/> |
26 | 21 |
27 <condition property="location.base" | 22 <condition property="location.base" |
28 value="${sdk.dir}" | 23 value="${sdk.dir}" |
29 else="${sdk.dir}/platforms/android-${sdk.version}"> | 24 else="${sdk.dir}/platforms/android-${sdk.version}"> |
30 <isset property="env.ANDROID_BUILD_TOP"/> | 25 <isset property="env.ANDROID_BUILD_TOP"/> |
31 </condition> | 26 </condition> |
32 | 27 |
33 <!-- We expect PRODUCT_DIR to be set like the gyp var | 28 <!-- We expect PRODUCT_DIR to be set like the gyp var |
34 (e.g. $ROOT/out/Debug) --> | 29 (e.g. $ROOT/out/Debug) --> |
35 <!-- TODO(jrg): ideally we need this to run before -build-setup, where | 30 <!-- TODO(jrg): ideally we need this to run before -build-setup, where |
36 directories are made based on this variable. --> | 31 directories are made based on this variable. --> |
37 <target name="-pre-build"> | 32 <target name="-pre-build"> |
38 <if> | 33 <if> |
39 <condition> | 34 <condition> |
40 <isset property="PRODUCT_DIR" /> | 35 <isset property="PRODUCT_DIR" /> |
41 </condition> | 36 </condition> |
42 <else> | 37 <else> |
43 <fail message="PRODUCT_DIR env var not set?" /> | 38 <fail message="PRODUCT_DIR env var not set?" /> |
44 </else> | 39 </else> |
45 </if> | 40 </if> |
46 </target> | 41 </target> |
47 | 42 |
48 <property name="out.dir" location="${PRODUCT_DIR}/replaceme_apk"/> | 43 <property name="out.dir" location="${PRODUCT_DIR}/replaceme_apk"/> |
49 | 44 |
50 <!-- TODO(jrg): should I make this directory specific to the apk? --> | 45 <property name="resource.absolute.dir" value="res"/> |
51 <property name="gen.absolute.dir" value="${out.dir}/gen"/> | 46 <property name="gen.absolute.dir" value="${out.dir}/gen"/> |
52 | 47 |
| 48 <!-- Nilesh: this is what we should transition to. |
| 49 TODO(jrg): make sure we transition; will involve gyp changes |
| 50 for placing jar outputs in new directory. |
| 51 When we transition we'll probably also want to change |
| 52 generate_native_test.py to copy the jars into java/libs, not |
| 53 just libs (see line 124 or so). |
| 54 --> |
| 55 <!-- |
| 56 <property name="jar.libs.dir" value="${out.dir}/java/libs"/> |
| 57 <property name="native.libs.absolute.dir" location="${out.dir}/libs" /> |
| 58 --> |
| 59 |
53 <import file="${sdk.dir}/tools/ant/build.xml" /> | 60 <import file="${sdk.dir}/tools/ant/build.xml" /> |
54 | 61 |
55 </project> | 62 </project> |
OLD | NEW |