Home | History | Annotate | Download | only in files
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3 ALIAS PROJECTS ARE CURRENT NOT SUPPORTED.
      4 THIS FILE IS CURRENTLY BROKEN AND SHOULD NOT BE USED.
      5 -->
      6 <project name="alias_rules" default="package">
      7 
      8     <!-- No user serviceable parts below. -->
      9 
     10     <!-- Input directories -->
     11     <property name="resource.dir" value="res" />
     12 
     13     <!-- The final package file to generate -->
     14     <property name="out.package" value="${ant.project.name}.apk" />
     15 
     16     <!-- Tools -->
     17     <condition property="aapt" value="${android.tools.dir}/aapt.exe" else="${android.tools.dir}/aapt">
     18         <os family="windows" />
     19     </condition>
     20     <condition property="adb" value="${android.tools.dir}/adb.exe" else="${android.tools.dir}/adb">
     21         <os family="windows" />
     22     </condition>
     23     <property name="android.jar" value="${sdk.dir}/android.jar" />
     24 
     25     <!-- Rules -->
     26 
     27     <!-- Packages the manifest and the resource files -->
     28     <target name="package-res">
     29         <echo>Packaging resources...</echo>
     30         <exec executable="${aapt}" failonerror="true">
     31             <arg value="package" />
     32             <arg value="-f" />
     33             <arg value="-M" />
     34             <arg value="AndroidManifest.xml" />
     35             <arg value="-S" />
     36             <arg value="${resource.dir}" />
     37             <arg value="-I" />
     38             <arg value="${android.jar}" />
     39             <arg value="-F" />
     40             <arg value="${out.package}" />
     41         </exec>
     42     </target>
     43 
     44     <!-- Create the package file for this project from the sources. -->
     45     <target name="package" depends="package-res" />
     46 
     47     <!-- Create the package and install package on the default emulator -->
     48     <target name="install" depends="package">
     49         <echo>Sending package to default emulator...</echo>
     50         <exec executable="${adb}" failonerror="true">
     51             <arg value="install" />
     52             <arg value="${out.package}" />
     53         </exec>
     54     </target>
     55 
     56 </project>
     57