-
Notifications
You must be signed in to change notification settings - Fork 169
/
build.xml
57 lines (49 loc) · 1.85 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
<project name="BlackWidow" basedir=".">
<description>Build file for BlackWidow Chess</description>
<property name="build.dir" value="build" />
<property name="lib.dir" value="lib" />
<property name="resources.dir" value="art" />
<property name="dist.dir" value="dist" />
<property name="manifest.file" value="${jar.dir}/MANIFEST.MF" />
<property name="main.class" value="com.chess.BlackWidow" />
<path id="master-classpath">
<fileset dir="${lib.dir}/">
<include name="*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<target name="initialize"
description="initial directory setup">
<mkdir dir="build"/>
</target>
<target name="clean"
description="removes all unwanted files">
<delete dir="build"/>
</target>
<target name="compile"
depends="initialize"
description="compiles source files">
<javac srcdir="src"
destdir="build"
includeAntRuntime="no"
failonerror="true"
classpath="xyz.jar"
excludes="tests/**/*.java">
<classpath refid="master-classpath"/>
</javac>
</target>
<target name="jar"
depends="compile"
description="builds jar file">
<jar destfile="${dist.dir}/BlackWidow.jar" basedir="${build.dir}">
<fileset dir="${build.dir}" includes="**/*.class" />
<fileset dir="${resources.dir}" />
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar" />
<manifest>
<attribute name="built-by" value="amir.afghani" />
<attribute name="Manifest-Version" value="1.0" />
<attribute name="Main-Class" value="${main.class}" />
</manifest>
</jar>
</target>
</project>