-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
82 lines (72 loc) · 2.48 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
<?xml version="1.0"?>
<project name="ChaosWheel" default="jar">
<property name="jar" value="${ant.project.name}.jar"/>
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="doc.dir" value="doc"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="applet.html" value="index.html"/>
<taskdef resource="checkstyletask.properties"/>
<target name="init">
<mkdir dir="${build.classes.dir}"/>
</target>
<target name="compile" depends="init"
description="Compile all source files.">
<javac srcdir="${src.dir}" destdir="${build.classes.dir}"
optimize="on" debug="on" deprecation="on"
includeantruntime="false">
<compilerarg value="-Xlint"/>
</javac>
<copy todir="${build.classes.dir}">
<fileset dir="${src.dir}" excludes="**/*.java"/>
</copy>
</target>
<target name="jar" depends="compile"
description="Generate the jarfile distributable.">
<jar destfile="${jar}" basedir="${build.classes.dir}">
<manifest>
<attribute name="Main-Class"
value="com.nullprogram.wheel.ChaosWheel"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar" description="Run the application.">
<java jar="${jar}" fork="true">
<jvmarg value="-server"/>
</java>
</target>
<target name="clean" description="Delete all generated files.">
<delete dir="${build.dir}"/>
<delete dir="${doc.dir}/javadoc"/>
<delete file="${jar}"/>
</target>
<target name="format" description="Run the indenter on all source files.">
<apply executable="astyle">
<arg value="--mode=java"/>
<arg value="--suffix=none"/>
<fileset dir="${src.dir}" includes="**/*.java"/>
</apply>
</target>
<target name="check">
<checkstyle config="doc/sun_checks.xml">
<fileset dir="src" includes="**/*.java"/>
</checkstyle>
</target>
<target name="javadoc" description="Generate Javadoc HTML.">
<javadoc destdir="${doc.dir}/javadoc">
<fileset dir="src" includes="**/*.java"/>
</javadoc>
</target>
<target name="tags" description="Generate a TAGS file for your editor.">
<delete file="TAGS"/>
<apply executable="etags">
<arg value="-a"/>
<fileset dir="${src.dir}" includes="**/*.java"/>
</apply>
</target>
<target name="applet" depends="jar" description="Run the applet version.">
<exec executable="appletviewer">
<arg value="${applet.html}"/>
</exec>
</target>
</project>