-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
38 lines (32 loc) · 1.38 KB
/
Copy pathbuild.xml
File metadata and controls
38 lines (32 loc) · 1.38 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
38
<?xml version="1.0" encoding="UTF-8"?>
<project name="warlords" basedir="." default="dist">
<property name="common.src.dir" location="common/src"/>
<property name="desktop.src.dir" location="desktop/src"/>
<property name="data.dir" location="data"/>
<property name="build.dir" location="build"/>
<property name="dist.dir" location="dist"/>
<target name="clean" description="Remove build directories">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="build" description="Compile the sources">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" includeantruntime="false" source="21" target="21">
<src path="${common.src.dir}"/>
<src path="${desktop.src.dir}"/>
</javac>
<copy todir="${build.dir}">
<fileset dir="${data.dir}"/>
</copy>
</target>
<target name="dist" depends="build" description="Generate the distribution">
<jar jarfile="${dist.dir}/${ant.project.name}.jar" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="com.def.warlords.desktop.Main"/>
</manifest>
</jar>
</target>
<target name="run" depends="dist" description="Run the application">
<java jar="${dist.dir}/${ant.project.name}.jar" fork="true"/>
</target>
</project>