-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
94 lines (74 loc) · 2.76 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
<?xml version="1.0" encoding="utf-8"?>
<project default="compile">
<!--
build.xml
name: Eric Huang for CS56, S13
edited by: Madhu Kannan, Colin Garrett for CS56, F16
edited by: Yiyang Xu, Nikita Tyagi for CS56 W18
-->
<property environment="env"/> <!-- load the environment variables -->
<property name="course" value="CS56" />
<property name="quarter" value="F16" />
<property name="mainClass" value="edu.ucsb.cs56.projects.games.gomoku.Viewer" />
<property name="origMainClass" value="edu.ucsb.cs56.projects.games.gomoku.GomokuOrig" />
<property name="projectName" value="${course}_${quarter}" />
<property name="projectPath"
value="edu/ucsb/${course}/projects/games/gomoku" />
<property name="javadocDest" value="docs/javadoc" />
<property name="javadocLink" value="https://docs.oracle.com/javase/8/docs/api/" />
<path id="project.class.path">
<pathelement location="build"/>
<pathelement location="lib/junit-4.8.2.jar"/>
</path>
<path id="project.class.path2">
<pathelement location="lib/junit-4.8.2.jar"/>
</path>
<target name="compile" description="compile the code">
<mkdir dir="build" />
<javac srcdir="src" destdir="build" debug="true" debuglevel="lines,source"
includeantruntime="false" >
<classpath refid="project.class.path" />
</javac>
</target>
<target name="run" depends="compile" description="run the code">
<java classname="${mainClass}" classpath="build"
fork="true" >
</java>
</target>
<target name="runorig" depends="compile" description="run the code">
<java classname="${origMainClass}" classpath="build"
fork="true" >
</java>
</target>
<target name="clean" description="clean up unnecessary directory">
<delete failonerror="false" verbose="true">
<fileset dir="build" includes="*.class"/>
</delete>
<delete dir="docs/javadoc" quiet="true" />
<delete dir="dist" quiet="true" />
<!--
<delete dir="download" quiet="true" />
-->
<delete dir="temp" quiet="true" />
</target>
<target name="javadoc" depends="compile" description="upload javadoc">
<mkdir dir = "docs" />
<delete dir="docs/javadoc" quiet="true" />
<javadoc destdir="docs/javadoc" author="true" version="true" use="true" >
<fileset dir="src" includes="**/*.java"/>
<classpath refid="project.class.path" />
<link href="${javadocLink}" />
</javadoc>
</target>
<target name="test" depends="compile" description="run JUnit tests">
<junit haltonerror="no" haltonfailure="no">
<classpath refid="project.class.path"/>
<batchtest fork="yes">
<fileset dir="src">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
<formatter type="brief" usefile="false" />
</junit>
</target>
</project>