-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
60 lines (55 loc) · 2.07 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
<project name="cardgame" default="compile" basedir=".">
<property name="src" value="src"/>
<property name="build" value="bin"/>
<property name="dist" location="dist"/>
<property name="lib" location="lib"/>
<path id="classpath">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<tstamp/>
<mkdir dir="Client/${build}"/>
<mkdir dir="Server/${build}"/>
<mkdir dir="${dist}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="Server/${src}" destdir="Server/${build}">
<classpath refid="classpath"/>
</javac>
<javac srcdir="Client/${src}" destdir="Client/${build}">
<classpath refid="classpath"/>
<classpath path="Server/${build}"/>
</javac>
</target>
<target name="client_dist" depends="compile">
<delete file="${dist}/client.jar"/>
<jar destfile="${dist}/client.jar">
<fileset dir="Client/${build}"/>
<fileset dir="Server/${build}" includes="cardgame/packets/*.class"/>
<fileset dir="Server/${build}" includes="cardgame/server/game/Card*.class"/>
<fileset dir="." includes="images/**/*.gif"/>
<zipfileset src="${lib}/mina.jar" includes="**/*.class"/>
<zipfileset src="${lib}/slf4j-api.jar" includes="**/*.class"/>
<zipfileset src="${lib}/slf4j-nop.jar" includes="**/*.class"/>
<zipfileset src="${lib}/trident.jar" includes="**/*.class **/*.properties">
</zipfileset>
<manifest>
<attribute name="Main-Class"
value="cardgame.client.Client"/>
</manifest>
</jar>
</target>
<target name="debug" depends="compile">
<java classname="cardgame.server.Server" classpath="Client/${build};Server/${build}" classpathref="classpath" spawn="true" fork="true" />
<sleep seconds="1" />
<java classname="cardgame.client.Client" classpath="Client/${build};Server/${build}" classpathref="classpath" spawn="true" fork="true">
<arg value="-debug1"/>
</java>
<sleep seconds="1" />
<java classname="cardgame.client.Client" classpath="Client/${build};Server/${build}" classpathref="classpath" spawn="true" fork="true">
<arg value="-debug2"/>
</java>
</target>
</project>