-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
55 lines (46 loc) · 1.64 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="test" name="Thing42">
<property name="src" location="src" />
<property name="build" location="bin/classes" />
<property name="jar.file" value="${ant.project.name}.jar" />
<property name="javadoc.dir" location="doc" />
<path id="junit.class.path">
<fileset dir="lib" includes="*.jar" />
<pathelement location="${build}" />
</path>
<target name="doc">
<mkdir dir="${javadoc.dir}" />
<javadoc sourcepath="${src}" destdir="${javadoc.dir}" classpathref="junit.class.path">
<fileset dir="src" defaultexcludes="yes">
<include name="**" />
</fileset>
</javadoc>
</target>
<target name="tar" depends="test">
<tar destfile="./prelim.tar" basedir="." excludes=".git/**, .gitignore/**, .settings/**, .project/**, .classpath/**, result.txt, .travis.yml" />
</target>
<target name="jar" depends="test">
<delete file="{$jar.file}" />
<jar destfile="${jar.file}" basedir="${build}">
</jar>
</target>
<target name="test" depends="compile">
<junit printsummary="withOutAndErr" haltonfailure="yes" showoutput="true">
<classpath>
<path refid="junit.class.path" />
</classpath>
<test name="Thing42Test" haltonfailure="no" outfile="result">
<formatter type="plain" usefile="false"/>
</test>
</junit>
</target>
<target name="compile" depends="clean">
<mkdir dir="${build}" />
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" classpathref="junit.class.path">
<compilerarg value="-Xlint"/>
</javac>
</target>
<target name="clean">
<delete dir="build" />
</target>
</project>