-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.xml
81 lines (70 loc) · 2.79 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
<project name="squiggle" default="all">
<property name="version" value="SNAPSHOT"/>
<target name="all" depends="clean, dist" description="Build everything"/>
<target name="clean" description="Clean up built files">
<delete dir="build"/>
</target>
<target name="compile" description="Compile Squiggle">
<mkdir dir="build/squiggle"/>
<javac srcdir="src" destdir="build/squiggle"/>
</target>
<target name="compile-tests" depends="jar" description="Compile tests">
<mkdir dir="build/tests"/>
<javac srcdir="tests" destdir="build/tests">
<classpath>
<pathelement location="build/squiggle-${version}.jar"/>
<fileset dir="lib/build"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile-tests" description="Runs the tests">
<junit fork="yes" forkmode="once" printsummary="no" showoutput="yes">
<classpath>
<pathelement location="build/squiggle-${version}.jar"/>
<pathelement location="build/tests"/>
<fileset dir="lib/build"/>
</classpath>
<formatter type="brief" usefile="no"/>
<batchtest haltonfailure="yes">
<fileset dir="tests">
<include name="**/Example*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="dist" depends="test, javadoc, src-zip" description="Build distribution bundles">
<mkdir dir="build/dist"/>
<copy todir="build/dist">
<fileset dir=".">
<include name="docs/**"/>
<include name="tests/**"/>
<include name="src/**"/>
<include name="build.xml"/>
<include name="CHANGES.txt"/>
<include name="LICENSE.txt"/>
</fileset>
</copy>
<copy todir="build/dist">
<fileset dir="build">
<include name="squiggle-${version}.jar"/>
<include name="squiggle-${version}-src.zip"/>
<include name="docs/**"/>
</fileset>
</copy>
<zip zipfile="build/squiggle-${version}.zip" basedir="build/dist"/>
<tar tarfile="build/squiggle-${version}.tgz" basedir="build/dist" compression="gzip"/>
</target>
<target name="jar" depends="compile" description="Build JAR for library">
<jar jarfile="build/squiggle-${version}.jar">
<fileset dir="build/squiggle"/>
</jar>
</target>
<target name="src-zip" description="Build JAR of sources for IDEs">
<zip zipfile="build/squiggle-${version}-src.zip">
<fileset dir="src"/>
</zip>
</target>
<target name="javadoc" description="Generate Javadoc documentation">
<javadoc sourcepath="src" destdir="build/docs/api"/>
</target>
</project>