-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
37 lines (32 loc) · 1.25 KB
/
build.xml
File metadata and controls
37 lines (32 loc) · 1.25 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Assignment" basedir="." default="clean-build">
<property name="src.dir" value="src"/>
<property name="resources.dir" value="resources"/>
<property name="build.dir" value="build"/>
<property name="dist.dir" value="dist"/>
<property name="main-class"
value="krados/oose/assignment/controller/GameEngine"/>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="compile">
<mkdir dir="${build.dir}"/>
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false" />
</target>
<target name="jar" depends="compile">
<mkdir dir="${dist.dir}"/>
<jar destfile="${dist.dir}/${ant.project.name}.jar" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
<copy todir="${dist.dir}">
<fileset dir="${resources.dir}"/>
</copy>
</target>
<target name="run" depends="jar">
<java jar="${dist.dir}/${ant.project.name}.jar" fork="true"/>
</target>
<target name="clean-build" depends="clean,jar"/>
</project>