-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
38 lines (33 loc) · 1.51 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
<project name="Virtual-Game-Shelf" default="makejar" basedir=".">
<description>
Ant build file for Virtual Game Shelf
</description>
<property name="src.dir" location="src"/>
<property name="build.dir" location="bin"/>
<property name="dist.dir" location="dist"/>
<property name="resources.dir" location="resources"/>
<property name="externals.dir" location="externals"/>
<property name="main.class" value="virtualgameshelf.gui.GameShelf"/>
<path id="classpath">
<fileset dir="${externals.dir}" includes="**/*.jar"/>
</path>
<target name="clean" description="delete old files">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="build" description="build class files" depends="clean">
<mkdir dir="${build.dir}"/> <!-- create build directory -->
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="classpath"/> <!-- Compile code into ${build} -->
</target>
<target name="makejar" depends="build">
<mkdir dir="${dist.dir}"/>
<jar destfile="${dist.dir}/virtual-game-shelf.jar" basedir="${build.dir}">
<fileset dir="${src.dir}"/>
<fileset dir="${resources.dir}"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
<zipgroupfileset dir="${externals.dir}" includes="*.jar"/><!-- combine external .jar dependencies -->
</jar>
</target>
</project>