blob: 45c0d3df06455567ca2f7a8193e075a63b591c11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
<!--
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 default="error">
<property name="ant.project.name" value="${APK_NAME}"/>
<!--
Gyp will pass CONFIGURATION_NAME as the target for ant to build. These targets will call the
appropriate sdk tools target.
-->
<target name="Debug" depends="debug"/>
<target name="Release" depends="release"/>
<target name="error">
<fail message="CONFIGURATION_NAME should be passed as a target to ant."/>
</target>
<description>
Building ${ant.project.name}.apk
</description>
<import file="common.xml"/>
<property-location
name="out.dir"
location="${PRODUCT_DIR}/${PACKAGE_NAME}"
check-exists="false"
/>
<path id="javac.srcdirs.additional">
<filelist files="${ADDITIONAL_SRC_DIRS}"/>
<filelist files="${GENERATED_SRC_DIRS}"/>
</path>
<property-value name="target.abi" value="${APP_ABI}"/>
<property name="resource.absolute.dir" value="${RESOURCE_DIR}"/>
<property-value name="gen.absolute.dir" value="${out.dir}/gen"/>
<property-location name="native.libs.absolute.dir" location="${out.dir}/libs"
check-exists="false"/>
<property-value name="version.code" value="${APP_MANIFEST_VERSION_CODE}"/>
<property-value name="version.name" value="${APP_MANIFEST_VERSION_NAME}"/>
<!--
We use the PROGUARD_ENABLED flag for enabling proguard. By default proguard is enabled for
Release builds if proguard.config is set. Setting proguard.config even to an empty string will
enable proguard. Set this property only when we have explicitly enabled proguard.
-->
<condition property="proguard.config" value="${PROGUARD_FLAGS}">
<istrue value="${PROGUARD_ENABLED}"/>
</condition>
<!-- TODO(shashishekhar): Enable emma and code-coverage filters. -->
<condition property="asset.absolute.dir"
value="${out.dir}/assets"
else="${ASSET_DIR}">
<equals arg1="${ASSET_DIR}" arg2=""/>
</condition>
<!-- Set the output directory for the final apk to the ${apks.dir}. -->
<property-location name="out.final.file"
location="${apks.dir}/${ant.project.name}-debug.apk"
check-exists="false"/>
<!-- Classpath for javac -->
<path id="javac.custom.classpath">
<filelist files="${INPUT_JARS_PATHS}"/>
</path>
<path id="out.dex.jar.input.ref">
<path refid="javac.custom.classpath"/>
</path>
<import file="sdk-targets.xml"/>
<import file="${sdk.dir}/tools/ant/build.xml"/>
</project>
|