-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
104 lines (88 loc) · 3.3 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="honcsim" default="jar" basedir=".">
<property name="version" value="0.1"/>
<property name="buildnumber" value="1"/>
<property name="junit.output.dir" value="junit"/>
<property name="test.home" value="test"/>
<path id="JUnit 4.libraryclasspath">
<pathelement location="lib/junit.jar"/>
<pathelement location="lib/hamcrest-core-1.3.jar"/>
</path>
<path id="m4rjni.classpath">
<pathelement location="lib/m4rjni.jar"/>
</path>
<path id="javaplex.classpath">
<pathelement location="lib/primitive-lib.jar"/>
<pathelement location="lib/javaplex-4.1.0.jar"/>
</path>
<path id="honcsim.classpath">
<pathelement location="bin"/>
<path refid="m4rjni.classpath"/>
<path refid="JUnit 4.libraryclasspath"/>
</path>
<tstamp>
<format property="this_year" pattern="yyyy"/>
</tstamp>
<property name="copyright" value="Copyright © ${this_year} Brenton Walker"/>
<target name="build" description="Compile the classes">
<mkdir dir="bin"/>
<javac srcdir="src/" destdir="bin" deprecation="on" includeantruntime="false">
<classpath>
<pathelement path="lib/m4rjni.jar"/>
<pathelement path="lib/javaplex-4.1.0.jar"/>
<pathelement path="lib/primitive-lib.jar"/>
<pathelement path="lib/plex-viewer-1.0.0.jar"/>
</classpath>
</javac>
</target>
<target name="jar" depends="build">
<delete file="honcsim.jar"/>
<delete file="MANIFEST.MF"/>
<manifest file="MANIFEST.MF">
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Class-Path" value="bin"/>
</manifest>
<jar destfile="honcsim.jar" basedir="bin" includes="honcsim/*.class" manifest="MANIFEST.MF"/>
</target>
<target name="doc">
<exec executable="javadoc">
<arg line="-d doc" />
<arg line="-sourcepath src" />
<arg line="-windowtitle honcsim" />
<arg line="honcsim" />
</exec>
</target>
<target name="test" depends="build,honcsim.DPointTest" />
<target name="honcsim.DPointTest">
<javac srcdir="test/" destdir="bin" deprecation="on" includeantruntime="false">
<classpath refid="honcsim.classpath"/>
</javac>
<mkdir dir="${junit.output.dir}"/>
<!-- the fork=yes here is essential, since we want the VM invoked with a different java.library.path -->
<junit fork="yes" printsummary="yes">
<formatter type="xml"/>
<classpath>
<path refid="honcsim.classpath" />
<path refid="javaplex.classpath" />
<fileset dir="lib">
<include name="**/junit.jar" />
<include name="**/m4rjni.jar" />
</fileset>
</classpath>
<test name="${test.entry}" todir="${junit.output.dir}" if="test.entry"/>
<batchtest todir="${junit.output.dir}" unless="test.entry">
<fileset dir="${test.home}">
<include name="**/*Test.java"/>
<exclude name="**/*AbstractTest.java"/>
</fileset>
</batchtest>
<sysproperty key="java.library.path" value="${java.library.path}:${user.dir}/lib"/>
<env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:lib" />
</junit>
</target>
<target name="clean">
<delete dir="./bin"/>
<delete dir="./junit"/>
<delete file="./honcsim.jar"/>
</target>
</project>