-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
63 lines (54 loc) · 2.09 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
<project name="rel" default="demo-jar">
<description>
Copy or link the clojure.jar and clojure-contrib.jar
into the deps directory.
To develop, put classes and . and deps into your classpath.
Build with "ant".
</description>
<property name="src.dir" location="."/>
<property name="classes.dir" location="classes"/>
<property name="deps" location="deps"/>
<property name="demo-jar.file" location="clojure-space-duel.jar"/>
<target name="init" description="create build directories">
<tstamp/>
<mkdir dir="${classes.dir}"/>
</target>
<target name="gen-classes"
depends="init"
description="generate classes">
<java classname="clojure.lang.Compile">
<classpath>
<path location="${classes.dir}"/>
<path location="${src.dir}"/>
<path location="${deps.dir}"/>
<fileset dir="${deps}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<sysproperty key="clojure.compile.path" value="${classes.dir}"/>
<arg value="hoeck.clojurebox2d.example.main"/>
</java>
</target>
<target name="unjar" depends="init">
<unjar dest="${classes.dir}">
<fileset dir="${deps}">
<include name="*.jar"/>
</fileset>
</unjar>
</target>
<target name="demo-jar" depends="unjar, gen-classes"
description="create jar including the clj sources and the custom classes">
<jar jarfile="${demo-jar.file}"
basedir="${classes.dir}">
<fileset dir="${src.dir}" includes="**/*.clj"/>
<manifest>
<attribute name="Class-Path" value="."/>
<attribute name="Main-Class" value="hoeck.clojurebox2d.example.main"/>
</manifest>
</jar>
</target>
<target name="clean" description="clean generated files (jar and classes)">
<delete dir="${classes.dir}"/>
<delete file="${demo-jar.file}"/>
</target>
</project>