forked from vexsoftware/votifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
46 lines (40 loc) · 1.4 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
<project name="Votifier" default="dist" basedir=".">
<description>
Automates the build process for the Votifier Bukkit plugin.
</description>
<!-- Script properties -->
<property name="src" location="./java"/>
<property name="build" location="./bin"/>
<property name="dist" location="./dist"/>
<property name="lib" location="./lib"/>
<property name="resources" location="./resources"/>
<property name="bukkit" location="./lib/craftbukkit.jar"/>
<!-- Initializes the build by creating the build directory -->
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${lib}"/>
<get src="http://dl.bukkit.org/latest-rb/craftbukkit.jar" dest="${lib}/craftbukkit.jar"/>
</target>
<!-- Compiles the Java source code into bytecode -->
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${build}" includeantruntime="false" debug="true" debuglevel="lines,source">
<classpath>
<pathelement path="${bukkit}"/>
</classpath>
</javac>
</target>
<!-- Distributes the compiled bytecode into a plugin JAR file -->
<target name="dist" depends="compile">
<jar destfile="${dist}/Votifier.jar">
<fileset dir="${build}"/>
<fileset dir="${resources}"/>
</jar>
</target>
<!-- Cleans the build and distribution directories -->
<target name="clean">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>