-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcustom_rules.xml
39 lines (33 loc) · 1.43 KB
/
custom_rules.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="utf-8"?>
<project name="custom_rules" default="debug">
<import file="custom_rules_multidex.xml" optional="true" />
<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>