forked from ucsb-cs56-projects/cs56-games-poker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
73 lines (60 loc) · 2.54 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
<project default="compile">
<!-- build.xml for github.com/UCSB-CS56-Projects/cs56-games-poker
original author: Joey Dewan S12
updated P. Conrad for github W14-->
<property environment="env"/>
<!-- load the environment variables -->
<property name="webRoot" value="${env.HOME}/public_html/"/>
<property name="webBaseURL" value="http://www.cs.ucsb.edu/~${env.USER}"/>
<property name="project" value="cs56-games-poker" />
<property name="mainClass" value="edu/ucsb/cs56/projects/games/poker/PokerMain"/>
<path id="project.class.path">
<pathelement location="build"/>
<pathelement location="lib/junit-4.8.2.jar"/>
</path>
<target name="compile" description="compiles the program">
<mkdir dir="build"/>
<javac srcdir="src" destdir="build" includeantruntime="false" debug="true" debuglevel="lines,vars,source">
<classpath refid="project.class.path" />
<compilerarg value ='-Xlint'/>
</javac>
<!-- copy the cards into the build directory -->
<copy todir="build/edu/ucsb/cs56/projects/games/poker/Cards">
<fileset dir="src/edu/ucsb/cs56/projects/games/poker/Cards" includes="*.png"/>
</copy>
</target>
<target name="run" depends="compile" description="run program">
<java classname="${mainClass}" classpath="build" fork="true"/>
</target>
<target name="clean" description="cleans up the directory">
<delete dir="build" quiet="true" />
<delete dir="javadoc" quiet="true" />
<delete dir="dist" quiet="true"/>
<delete dir="download" quiet="true"/>
<delete dir="temp" quiet="true"/>
<delete file="numberedsource.txt" quiet="true"/>
</target>
<target name="javadoc" depends="compile" description="deploys the javadoc onto gh-pages">
<delete dir="javadoc" quiet="true"/>
<javadoc destdir="javadoc" author="true" version="true" use="true">
<fileset dir="src" includes="**/*.java"/>
<classpath>
<pathelement location="/cs/faculty/pconrad/public_html/cs56/lib/junit-4.8.2.jar"/>
</classpath>
<link href="https://docs.oracle.com/javase/8/docs/api/" />
</javadoc>
<echo>Javadoc written to javadoc/index.html</echo>
</target>
<target name="test" depends="compile" description="test the Hand class">
<junit haltonerror="no" haltonfailure="no">
<classpath refid="project.class.path" />
<batchtest fork="yes">
<fileset dir="src">
<!-- this will pick up every class with a name ending in Test -->
<include name="**/*Test.java"/>
</fileset>
</batchtest>
<formatter type="plain" usefile="false" />
</junit>
</target>
</project>