-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
65 lines (56 loc) · 1.88 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
<?xml version="1.0"?>
<project name="Isometric Blocks" default="run">
<!-- Project-specific configuration -->
<property name="package" value="com.suckyblowfish.isoblocks"/>
<property name="main.class" value="${package}.Isoblocks"/>
<property name="jar.file" value="${ant.project.name}.jar"/>
<property name="src.dir" value="src"/>
<property name="res.dir" value="res"/>
<property name="build.dir" value="build"/>
<property name="dist.dir" value="dist"/>
<property name="lib.dir" value="lib"/>
<path id="master-classpath">
<fileset dir="${lib.dir}/jar">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}/native">
<include name="*.so"/>
</fileset>
<fileset dir="${build.dir}">
<include name="*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<!-- Targets -->
<target name="init">
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
<target name="compile" depends="init"
description="Compile all source files.">
<javac srcdir="${src.dir}" destdir="${build.dir}"
optimize="on" debug="on" deprecation="on"
includeantruntime="false">
<classpath refid="master-classpath"/>
<compilerarg value="-Xlint"/>
</javac>
<copy todir="${build.dir}">
<fileset dir="${res.dir}"/>
</copy>
</target>
<target name="jar" depends="compile"
description="Generate the jarfile distributable.">
<jar destfile="${dist.dir}/${jar.file}" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar" description="Run the application.">
<java jar="${dist.dir}/${jar.file}" fork="true"/>
</target>
<target name="clean" description="Delete all generated files.">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
</project>