-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.xml
69 lines (60 loc) · 3.49 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
<project default="compile">
<!-- build.xml for cpoint1, W12, CS56
name:Keith Waldron and Nick Abrahan, updated W14 -->
<property environment="env"/> <!-- load the environment variables -->
<property name="webRoot" value="${env.HOME}/public_html/cs56" /> <!-- DONE -->
<property name="webBaseUrl" value="http://www.cs.ucsb.edu/~${env.USER}/cs56" /> <!-- DONE -->
<property name="projectName" value="cs56-games-Go" />
<property name="mainClass" value="Go.Main" />
<property name="javadoc_absolute_path" location="docs/javadoc"/>
<property name="public_javadoc_path" location="../public_javadoc_workaround/javadoc"/>
<target name="compile" depends="clean" description="compile my code">
<mkdir dir="build" />
<javac srcdir="src" destdir="build" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<compilerarg value="-Xlint:unchecked"/>
<classpath>
<pathelement location="build"/>
<pathelement location="lib/junit-4.8.2.jar"/>
</classpath>
</javac>
</target>
<path id="project.class.path">
<pathelement location="build"/>
<pathelement location="lib/junit-4.8.2.jar"/>
</path>
<target name="run" depends="compile" description="run the gogame program">
<java classname="${mainClass}" classpath="build" fork="true" />
</target>
<target name="clean" description="delete unnecessary files and directories">
<delete dir="build" quiet="true" />
<delete dir="javadoc" quiet="true" />
</target>
<target name="javadoc" depends="compile" description="generate javadoc">
<delete quiet="true">
<fileset dir="javadoc" />
</delete>
<javadoc destdir="javadoc">
<fileset dir="src" >
<include name="**/*.java"/>
</fileset>
<classpath refid="project.class.path" />
<link href="https://docs.oracle.com/javase/8/docs/api/" />
</javadoc>
<echo>
javadoc written to file://${javadoc_path}/index.html
copying to ${public_javadoc_path}/index.html
</echo>
<delete quiet="true">
<fileset dir="${public_javadoc_path}" />
</delete>
<mkdir dir="${public_javadoc_path}" />
<copy todir="${public_javadoc_path}">
<fileset dir="javadoc" />
</copy>
<echo>
javadoc copied to ${public_javadoc_path}/index.html
TO PUBLISH: cd into that repo, then git add javadoc;
git commit -m "update javadoc"; git push origin master
</echo>
</target>
</project>