cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / build / android / ant / apk-package.xml
blobcb7956091810c8c4da8e120376e6eeb0855bfb58
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     Copyright (C) 2005-2008 The Android Open Source Project
5     Licensed under the Apache License, Version 2.0 (the "License");
6     you may not use this file except in compliance with the License.
7     You may obtain a copy of the License at
9          http://www.apache.org/licenses/LICENSE-2.0
11     Unless required by applicable law or agreed to in writing, software
12     distributed under the License is distributed on an "AS IS" BASIS,
13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14     See the License for the specific language governing permissions and
15     limitations under the License.
16 -->
18 <project default="-package">
19   <property name="verbose" value="false" />
20   <property name="out.dir" location="${OUT_DIR}" />
21   <property name="out.absolute.dir" location="${out.dir}" />
23   <property name="sdk.dir" location="${ANDROID_SDK_ROOT}"/>
24   <property name="emma.device.jar" location="${EMMA_DEVICE_JAR}" />
26   <condition property="emma.enabled" value="true" else="false">
27     <equals arg1="${EMMA_INSTRUMENT}" arg2="1"/>
28   </condition>
30   <!-- jar file from where the tasks are loaded -->
31   <path id="android.antlibs">
32     <pathelement path="${sdk.dir}/tools/lib/ant-tasks.jar" />
33   </path>
35   <!-- Custom tasks -->
36   <taskdef resource="anttasks.properties" classpathref="android.antlibs" />
38   <condition property="build.target" value="release" else="debug">
39     <equals arg1="${CONFIGURATION_NAME}" arg2="Release" />
40   </condition>
41   <condition property="build.is.packaging.debug" value="true" else="false">
42     <equals arg1="${build.target}" arg2="debug" />
43   </condition>
45   <!-- Disables automatic signing. -->
46   <property name="build.is.signing.debug" value="false"/>
48   <!-- SDK tools assume that out.packaged.file is signed and name it "...-unaligned" -->
49   <property name="out.packaged.file" value="${UNSIGNED_APK_PATH}" />
51   <property name="native.libs.absolute.dir" location="${NATIVE_LIBS_DIR}" />
53   <!-- Intermediate files -->
54   <property name="resource.package.file.name" value="${RESOURCE_PACKAGED_APK_NAME}" />
56   <property name="intermediate.dex.file" location="${DEX_FILE_PATH}" />
57   <condition property="multidex.enabled" value="true">
58     <equals arg1="${MULTIDEX_ENABLED}" arg2="1"/>
59   </condition>
61   <!-- Macro that enables passing a variable list of external jar files
62        to ApkBuilder. -->
63   <macrodef name="package-helper">
64     <element name="extra-jars" optional="yes" />
65     <sequential>
66       <apkbuilder
67           outfolder="${out.absolute.dir}"
68           resourcefile="${resource.package.file.name}"
69           apkfilepath="${out.packaged.file}"
70           debugpackaging="${build.is.packaging.debug}"
71           debugsigning="${build.is.signing.debug}"
72           verbose="${verbose}"
73           hascode="${HAS_CODE}"
74           previousBuildType="/"
75           buildType="${build.is.packaging.debug}/${build.is.signing.debug}">
76         <dex path="${intermediate.dex.file}" />
77         <nativefolder path="${native.libs.absolute.dir}" />
78         <extra-jars/>
79       </apkbuilder>
80     </sequential>
81   </macrodef>
83   <macrodef name="multidex-package-helper">
84     <element name="extra-jars" optional="yes" />
85     <sequential>
86       <apkbuilder
87           outfolder="${out.absolute.dir}"
88           resourcefile="${resource.package.file.name}"
89           apkfilepath="${out.packaged.file}"
90           debugpackaging="${build.is.packaging.debug}"
91           debugsigning="${build.is.signing.debug}"
92           verbose="${verbose}"
93           hascode="false"
94           previousBuildType="/"
95           buildType="${build.is.packaging.debug}/${build.is.signing.debug}">
96         <zip path="${intermediate.dex.file}" />
97         <nativefolder path="${native.libs.absolute.dir}" />
98         <extra-jars/>
99       </apkbuilder>
100     </sequential>
101   </macrodef>
103   <!-- Packages the application. -->
104   <target name="-package">
105     <if condition="${emma.enabled}">
106       <then>
107         <package-helper>
108           <extra-jars>
109             <jarfile path="${emma.device.jar}" />
110           </extra-jars>
111         </package-helper>
112       </then>
113       <else>
114         <if condition="${multidex.enabled}">
115           <then>
116             <multidex-package-helper />
117           </then>
118           <else>
119             <package-helper />
120           </else>
121         </if>
122       </else>
123     </if>
124   </target>
125 </project>