Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / build / android / ant / apk-package.xml
blobe8b76f7e453064d56ef3ac2f4c3a3d44be1d7e57
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}" />
58   <!-- Macro that enables passing a variable list of external jar files
59        to ApkBuilder. -->
60   <macrodef name="package-helper">
61     <element name="extra-jars" optional="yes" />
62     <sequential>
63       <apkbuilder
64           outfolder="${out.absolute.dir}"
65           resourcefile="${resource.package.file.name}"
66           apkfilepath="${out.packaged.file}"
67           debugpackaging="${build.is.packaging.debug}"
68           debugsigning="${build.is.signing.debug}"
69           verbose="${verbose}"
70           hascode="${HAS_CODE}"
71           previousBuildType="/"
72           buildType="${build.is.packaging.debug}/${build.is.signing.debug}">
73         <dex path="${intermediate.dex.file}"/>
74         <nativefolder path="${native.libs.absolute.dir}" />
75         <extra-jars/>
76       </apkbuilder>
77     </sequential>
78   </macrodef>
81   <!-- Packages the application. -->
82   <target name="-package">
83     <if condition="${emma.enabled}">
84       <then>
85         <package-helper>
86           <extra-jars>
87             <jarfile path="${emma.device.jar}" />
88           </extra-jars>
89         </package-helper>
90       </then>
91       <else>
92         <package-helper />
93       </else>
94     </if>
95   </target>
96 </project>