38 lines
1.4 KiB
XML
38 lines
1.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<project name="custom_rules" default="debug">
|
|
<fail
|
|
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
|
|
unless="sdk.dir"
|
|
/>
|
|
|
|
<path id="android.antlibs">
|
|
<pathelement path="${sdk.dir}/tools/lib/ant-tasks.jar" />
|
|
</path>
|
|
|
|
<!-- Custom tasks -->
|
|
<taskdef resource="anttasks.properties" classpathref="android.antlibs" />
|
|
|
|
<condition property="exe" value=".exe" else=""><os family="windows" /></condition>
|
|
<condition property="bat" value=".bat" else=""><os family="windows" /></condition>
|
|
|
|
<getbuildtools name="android.build.tools.dir" verbose="${verbose}" />
|
|
<property name="aapt" location="${android.build.tools.dir}/aapt${exe}" />
|
|
<property name="aidl" location="${android.build.tools.dir}/aidl${exe}" />
|
|
<property name="dx" location="${android.build.tools.dir}/dx${bat}" />
|
|
<if>
|
|
<condition>
|
|
<resourceexists>
|
|
<file file="${android.build.tools.dir}/zipalign${exe}" />
|
|
</resourceexists>
|
|
</condition>
|
|
<then>
|
|
<property name="zipalign" location="${android.build.tools.dir}/zipalign${exe}" />
|
|
</then>
|
|
<else>
|
|
<property name="android.tools.dir" location="${sdk.dir}/tools" />
|
|
<property name="zipalign" location="${android.tools.dir}/zipalign${exe}" />
|
|
</else>
|
|
</if>
|
|
|
|
</project>
|