-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
81 lines (65 loc) · 2.72 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="yaclpplib" default="all">
<property name="version" value="1.0"/>
<dirname property="basedir" file="${ant.file}"/>
<property name="outdir" value="${basedir}/build"/>
<property name="docdir" value="${basedir}/doc"/>
<property name="testdir" value="${basedir}/testbuild"/>
<path id="classpath">
<pathelement location="${outdir}"/>
<pathelement location="lib/junit-4.12.jar" />
<pathelement location="lib/hamcrest-core-1.3.jar" />
</path>
<path id="sourcepath">
<pathelement location="${basedir}/src"/>
</path>
<path id="testpath">
<pathelement location="${basedir}/test"/>
</path>
<target name="compile" depends="compile.production,compile.tests"
description="Compile all classes"/>
<target name="compile.production" description="Compile production classes">
<mkdir dir="${outdir}"/>
<javac destdir="${outdir}" fork="true" includeantruntime="false">
<classpath refid="classpath"/>
<src refid="sourcepath"/>
</javac>
</target>
<target name="doc" depends="clean">
<mkdir dir="${docdir}"/>
<javadoc destdir="${docdir}" access="private" Overview="overview.html" charset="utf8">
<fileset dir="${basedir}/src" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
</javadoc>
</target>
<target name="test" depends="compile.tests">
<junit showoutput="yes" printsummary="yes" haltonfailure="yes">
<classpath location="${testdir}"/>
<classpath refid="classpath"/>
<batchtest fork="yes">
<fileset dir="test">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="compile.tests" depends="compile.production"
description="Compile test classes">
<mkdir dir="${testdir}"/>
<javac destdir="${testdir}" fork="true" includeantruntime="false">
<classpath refid="classpath"/>
<src refid="testpath"/>
</javac>
</target>
<target name="package" depends="compile.production" description="Creates the JAR">
<jar basedir="${outdir}" destfile="yaclpplib-${version}.jar" includes="cz/**"/>
</target>
<target name="clean" description="cleanup module">
<delete dir="${outdir}"/>
<delete dir="${docdir}"/>
<delete dir="${testdir}"/>
</target>
<target name="build" depends="compile, doc, package" description="Build everything"/>
<target name="all" depends="clean, build, test" description="Build from scratch and test"/>
</project>