diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:29:09 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:29:09 -0800 |
commit | 55a2c71f27d3e0b8344597c7f281e687cb7aeb1b (patch) | |
tree | ecd18b995aea8eeeb8b3823266280d41245bf0f7 /scripts/alias_rules.xml | |
parent | 82ea7a177797b844b252effea5c7c7c5d63ea4ac (diff) | |
download | sdk-55a2c71f27d3e0b8344597c7f281e687cb7aeb1b.zip sdk-55a2c71f27d3e0b8344597c7f281e687cb7aeb1b.tar.gz sdk-55a2c71f27d3e0b8344597c7f281e687cb7aeb1b.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'scripts/alias_rules.xml')
-rw-r--r-- | scripts/alias_rules.xml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/scripts/alias_rules.xml b/scripts/alias_rules.xml new file mode 100644 index 0000000..bc7de7c --- /dev/null +++ b/scripts/alias_rules.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="alias_rules" default="package"> + + <!-- No user servicable parts below. --> + + <!-- Input directories --> + <property name="resource-dir" value="res" /> + + <!-- The final package file to generate --> + <property name="out-package" value="${ant.project.name}.apk" /> + + <!-- Tools --> + <condition property="aapt" value="${android-tools}/aapt.exe" else="${android-tools}/aapt" > + <os family="windows"/> + </condition> + <condition property="adb" value="${android-tools}/adb.exe" else="${android-tools}/adb" > + <os family="windows"/> + </condition> + <property name="android-jar" value="${sdk-folder}/android.jar" /> + + <!-- Rules --> + + <!-- Packages the manifest and the resource files --> + <target name="package-res"> + <echo>Packaging resources...</echo> + <exec executable="${aapt}" failonerror="true"> + <arg value="package" /> + <arg value="-f" /> + <arg value="-M" /> + <arg value="AndroidManifest.xml" /> + <arg value="-S" /> + <arg value="${resource-dir}" /> + <arg value="-I" /> + <arg value="${android-jar}" /> + <arg value="-F" /> + <arg value="${out-package}" /> + </exec> + </target> + + <!-- Create the package file for this project from the sources. --> + <target name="package" depends="package-res" /> + + <!-- Create the package and install package on the default emulator --> + <target name="install" depends="package"> + <echo>Sending package to default emulator...</echo> + <exec executable="${adb}" failonerror="true"> + <arg value="install" /> + <arg value="${out-package}" /> + </exec> + </target> + +</project> |