1 <?xml version="1.0" encoding="UTF-8"?>
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.
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"/>
30 <!-- jar file from where the tasks are loaded -->
31 <path id="android.antlibs">
32 <pathelement path="${sdk.dir}/tools/lib/ant-tasks.jar" />
36 <taskdef resource="anttasks.properties" classpathref="android.antlibs" />
38 <condition property="build.target" value="release" else="debug">
39 <equals arg1="${CONFIGURATION_NAME}" arg2="Release" />
41 <condition property="build.is.packaging.debug" value="true" else="false">
42 <equals arg1="${build.target}" arg2="debug" />
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
60 <macrodef name="package-helper">
61 <element name="extra-jars" optional="yes" />
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}"
72 buildType="${build.is.packaging.debug}/${build.is.signing.debug}">
73 <dex path="${intermediate.dex.file}"/>
74 <nativefolder path="${native.libs.absolute.dir}" />
81 <!-- Packages the application. -->
82 <target name="-package">
83 <if condition="${emma.enabled}">
87 <jarfile path="${emma.device.jar}" />