-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
65 lines (56 loc) · 1.75 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
<project name="Battlecode 2015" basedir="." default="build"
xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="path.base" location="."/>
<property name="path.target" location="${path.base}/target"/>
<property name="path.src" location="${path.base}/src"/>
<property name="path.lib" location="${path.base}/lib/"/>
<path id="classpath">
<fileset dir="${path.lib}">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${path.target}"/>
</path>
<target name="init">
<mkdir dir="${path.target}"/>
</target>
<target name="clean">
<delete dir="${path.target}"/>
</target>
<target name="resolve" depends="clean,init">
<ivy:retrieve/>
</target>
<target name="build" depends="resolve">
<javac
classpathref="classpath"
destdir="${path.target}"
includeantruntime="false"
debug="true">
<src path="${path.src}"/>
<compilerarg line="-Xlint"/>
</javac>
</target>
<target name="test" depends="build">
<junit fork="yes" haltonfailure="yes">
<classpath refid="classpath"/>
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="${path.src}/test/java">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="lint" depends="init-checkstyle">
<checkstyle config="checkstyle.xml" failOnViolation="yes">
<fileset dir="${path.src}">
<include name="**/*.java"/>
</fileset>
</checkstyle>
</target>
<target name="init-checkstyle" depends="resolve">
<path id="checkstyle.lib.path">
<fileset dir="lib" includes="*.jar"/>
</path>
<taskdef resource="checkstyletask.properties" classpathref="checkstyle.lib.path"/>
</target>
</project>