-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.xml
80 lines (68 loc) · 3.04 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
<project name="Pac-Man" default="compile">
<!-- build.xml for CS56 W16 Pac-Man game -->
<property environment="env"/> <!-- load the environment variables -->
<property name="projectPackage" value="edu.ucsb.cs56.projects.games.pacman" />
<property name="out.assets.dir" value="build/edu/ucsb/cs56/projects/games/pacman/assets" />
<property name="projectName" value="cs56-games-pacman" />
<property name="javadocDest" value="$docs/javadoc" />
<property name="javadocLink" value="http://java.sun.com/javase/7/docs/api/" />
<path id="project.class.path">
<pathelement location="./build"/>
<pathelement location="lib/junit-4.8.2.jar"/>
</path>
<target name="compile" description="Compile Pac-Man code.">
<mkdir dir="build" />
<mkdir dir="${out.assets.dir}" />
<copy includeemptydirs="false" todir="${out.assets.dir}">
<fileset dir="assets"/>
</copy>
<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 Pac-Man game.">
<java classpath="build" classname="${projectPackage}.PacMan" fork="true"/>
</target>
<target name="run-convert" depends="compile" description="Run Pac-Man level conversion (deprecated).">
<java classpath="build" classname="${projectPackage}.editor.GridDataConversion" fork="true"/>
</target>
<target name="run-editor" depends="compile" description="Run Pac-Man lavel editor.">
<java classpath="build" classname="${projectPackage}.editor.PacManLevelEditor" fork="true"/>
</target>
<target name="run-args" depends="compile" description="Run Pac-Man game with arguments.">
<java classpath="build" classname="${projectPackage}.PacMan" fork="true">
<arg value="${arg0}"/>
<arg value="${arg1}"/>
</java>
</target>
<target name="run-dev" depends="compile" description="Run Pac-Man in developer mode.">
<java classpath="build" classname="${projectPackage}.PacMan" fork="true">
<arg value="dev"/>
<arg value="${arg1}"/>
</java>
</target>
<target name="javadoc" depends="compile" description="Generate/publish javadoc.">
<delete dir="docs/javadoc" quiet="true" />
<javadoc destdir="docs" author="true" version="true" use="true" >
<!-- destdir changed from javadoc to docs-->
<fileset dir="src" includes="**/*.java"/>
<classpath refid="project.class.path" />
<link href="${javadocLink}" /> <!-- for external links to std API classes -->
</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="plain" usefile="false" />
</junit>
</target>
<target name="clean" description="Delete unnecessary files and directories.">
<delete dir="build" failonerror="false" verbose="true" />
<delete dir="docs" failonerror="false" verbose="true" />
</target>
</project>