forked from rictic/code_swarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
79 lines (69 loc) · 2.6 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
<?xml version="1.0"?>
<project name="code_swarm" default="all" basedir=".">
<target name="init" description="Sets build properties">
<echo>Running INIT</echo>
<property name="src" value="${basedir}/src" />
<property name="build" value="${basedir}/build" />
<property name="doc" value="${basedir}/doc" />
<property name="lib" value="${basedir}/lib" />
<property name="dist" value="${basedir}/dist" />
<property name="data" value="${basedir}/data" />
<tstamp/>
</target>
<target name="all" depends="jar" description="Builds JAR and Javadoc">
<echo>Building ALL</echo>
</target>
<target name="build" depends="init" description="Compiles">
<echo>Running BUILD</echo>
<mkdir dir="${build}" />
<path id="library.classpath">
<pathelement path="lib/" />
<pathelement location="lib/core.jar" />
<pathelement location="lib/xml.jar" />
<pathelement location="lib/jogl.jar" />
<pathelement location="lib/opengl.jar" />
<pathelement location="lib/vecmath.jar" />
<pathelement location="lib/svnkit.jar" />
<pathelement location="lib/swing-layout-1.0.3.jar" />
</path>
<javac destdir="${build}" srcdir="${src}" classpathref="library.classpath"
debug="true" deprecation="false">
<compilerarg value="-Xlint:unchecked"/>
</javac>
<copy file="${src}/particle.png" todir="${build}" />
</target>
<target name="doc" depends="init" description="Generates Javadoc documentation">
<javadoc destdir="${doc}" access="private">
<fileset dir="${src}" includes="*.java"/>
</javadoc>
</target>
<target name="jar" depends="build" description="Packs application into a JAR">
<echo>Running JAR</echo>
<mkdir dir="${dist}" />
<jar basedir="${build}" jarfile="${dist}/${ant.project.name}.jar">
<manifest>
<attribute name="Main-Class" value="code_swarm" />
</manifest>
</jar>
</target>
<target name="run" depends="jar" description="Runs the program">
<echo>Running code_swarm</echo>
<java classname="MainView" fork="true">
<jvmarg value="-Xmx1000m" />
<arg value="data/sample.config"/>
<classpath>
<fileset dir="${dist}">
<include name="${ant.project.name}.jar"/>
</fileset>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</java>
</target>
<target name="clean" depends="init" description="Removed compiled files">
<echo>Running CLEAN</echo>
<delete dir="${build}" verbose="true"/>
<delete dir="${dist}" verbose="true"/>
</target>
</project>