-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
106 lines (88 loc) · 2.73 KB
/
build.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
97
98
99
100
101
102
103
104
105
106
<project name="doclava" default="jar">
<property name="jar.dir" value="build/dist/doclava"/>
<property name="jar.file" value="${jar.dir}/doclava.jar"/>
<property environment="env"/>
<property name="javahome" value="${env.JAVA_HOME}" />
<property name="jsilver" value="lib/jsilver.jar"/>
<property name="junit" value="lib/junit-4.8.2.jar"/>
<path id="classpath.test">
<pathelement location="${junit}" />
<pathelement location="${jar.file}" />
<pathelement location="build/test" />
</path>
<target name="compile" description="Compile Java source.">
<mkdir dir="build/classes"/>
<javac srcdir="src"
debug="on"
destdir="build/classes"
source="1.5"
target="1.5"
extdirs="">
<compilerarg value="-Xlint:all"/>
<classpath>
<pathelement location="${jsilver}"/>
</classpath>
</javac>
</target>
<target name="jar" depends="compile" description="Build jar.">
<mkdir dir="${jar.dir}"/>
<copy todir="build/classes/assets">
<fileset dir="res/assets"/>
</copy>
<jar jarfile="${jar.file}" manifest="src/MANIFEST.mf">
<fileset dir="build/classes"/>
<zipfileset src="${jsilver}" />
</jar>
</target>
<target name="clean"
description="Remove generated files.">
<delete dir="build"/>
</target>
<target name="clean-jar"
description="cleans and builds a .jar"
depends="clean,jar">
</target>
<target name="compile-test">
<mkdir dir="build/test" />
<exec executable="/bin/sh">
<arg value="-c"/>
<arg value="find test/doclava/sample -name '*.java' > build/test/src-list"/>
</exec>
<javac srcdir="test" destdir="build/test">
<classpath refid="classpath.test" />
</javac>
</target>
<target name="test" depends="jar,compile-test">
<junit>
<classpath refid="classpath.test" />
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="build/test">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="doclava" description="Generate documentation">
<taskdef name="doclava" classname="com.google.doclava.DoclavaTask" classpath="${jar.file}"/>
<mkdir dir="build"/>
<exec executable="/bin/sh">
<arg value="-c"/>
<arg value="find ./src -name '*.java' > build/src-list"/>
</exec>
<doclava>
<arguments>
-quiet
-bootclasspath "${javahome}/jre/lib/rt.jar"
-doclet com.google.doclava.Doclava
-docletpath ${jar.file}
-classpath ${jar.file}
-d build/api
-hdf project.name "Junction"
-stubs build/stubs
-apixml build/public_api.xml
@build/src-list
</arguments>
</doclava>
</target>
</project>