-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
38 lines (32 loc) · 1.36 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Quake-of-the-Chambered" basedir="." default="jar">
<property name="source.dir" value="src"/>
<property name="res.dir" value="res"/>
<property name="class.dir" value="bin"/>
<property name="jar.dir" value="dist"/>
<property name="jar.file" value="${jar.dir}/${ant.project.name}.jar"/>
<property name="main-class" value="com.mojang.escape.EscapeComponent"/>
<target name="clean" description="delete old files">
<delete dir="${class.dir}"/>
<delete dir="${jar.dir}"/>
</target>
<target name="compile" description="build class files" depends="clean">
<mkdir dir="${class.dir}"/>
<javac srcdir="${source.dir}" destdir="${class.dir}">
<compilerarg line="-encoding utf-8"/>
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.file}" basedir="${class.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="${res.dir}"/>
</jar>
</target>
<target name="run" depends="jar">
<java jar="${jar.dir}/${ant.project.name}.jar" fork="true"/>
</target>
</project>