forked from thunderbird/thunderbird-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_common.xml
96 lines (79 loc) · 3.01 KB
/
build_common.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<project name="common">
<!-- This file contains scriptdefs, properties, targets, etc that are common
to both build.xml and tests/build.xml. It also loads ant-contrib, where
each desired task needs to be defined below as both ant-contrib and
Android's anttasks.jar define different 'if' tasks. -->
<!-- ANT-CONTRIB -->
<!-- jar file from where the tasks are loaded -->
<if>
<condition>
<isset property="tested.project.dir" />
</condition>
<then>
<path id="antcontrib">
<pathelement path="${tested.project.dir}/tools/ant-contrib.jar" />
</path>
</then>
<else>
<path id="antcontrib">
<pathelement path="tools/ant-contrib.jar" />
</path>
</else>
</if>
<!-- ant-contrib tasks -->
<!-- this is normally named propertyregex -->
<taskdef name="regex"
classname="net.sf.antcontrib.property.RegexTask"
classpathref="antcontrib" />
<taskdef name="math"
classname="net.sf.antcontrib.math.MathTask"
classpathref="antcontrib" />
<taskdef name="runtarget"
classname="net.sf.antcontrib.logic.RunTargetTask"
classpathref="antcontrib" />
<taskdef name="var"
classname="net.sf.antcontrib.property.Variable"
classpathref="antcontrib" />
<!-- renamed to not conflict with android -->
<taskdef name="if.contrib"
classname="net.sf.antcontrib.logic.IfTask"
classpathref="antcontrib" />
<!-- SCRIPTDEFS -->
<!-- PROPERTIES -->
<!-- allow environment variables to be accessable by prepending "env." -->
<property environment="env" />
<!-- javadoc folder relative to ${basedir} -->
<property name="javadoc-dir" location="javadoc" />
<!-- path to lint -->
<property name="lint" location="${android.tools.dir}/lint${bat}" />
<!-- TARGETS -->
<!-- create javadoc in ${javadoc-dir} -->
<target name="javadoc" description="build javadoc">
<mkdir dir="${javadoc-dir}"/>
<javadoc
destdir="${javadoc-dir}"
doctitle="K-9 Mail"
verbose="on"
use="true"
classpath="${env.ANDROID_HOME}/platforms/${target}/android.jar"
sourcepath="gen;src"
linkoffline="http://d.android.com/reference ${env.ANDROID_HOME}/docs/reference/"
/>
</target>
<!-- create lint-results.xml -->
<target name="lint-xml">
<exec executable="${lint}" failonerror="true">
<arg value="--xml" />
<arg value="lint-results.xml" />
<arg path="${basedir}" />
</exec>
</target>
<!-- create lint-results.html and lint-results_files/ -->
<target name="lint-html">
<exec executable="${lint}" failonerror="true">
<arg value="--html" />
<arg value="lint-results.html" />
<arg path="${basedir}" />
</exec>
</target>
</project>