-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
59 lines (51 loc) · 2.04 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
<?xml version="1.0" ?>
<project default="main">
<property environment="env"/>
<path id="classpath">
<fileset dir="lib" includes="**/*.jar"/>
</path>
<target name="main" depends="clean, compile, compress" description="Main target">
<echo>Building the .jar file.</echo>
</target>
<target name="clean" description="Cleans project">
<echo>Cleaning</echo>
<delete failonerror="false">
<fileset dir="bin" includes="**/*" />
</delete>
<delete failonerror="false">
<fileset dir="." includes="*.jar" />
</delete>
<mkdir dir="bin"/>
<!--
ci.bukkit.org sucks now...
<echo>Retreiving Libraries</echo>
<mkdir dir="lib"/>
<echo>- Bukkit</echo>
<get src="http://ci.bukkit.org/job/dev-Bukkit/lastSuccessfulBuild/artifact/target/bukkit-0.0.1-SNAPSHOT.jar" dest="lib/bukkit.jar" verbose="false" usetimestamp="true" />
<echo>- CraftBukkit</echo>
<get src="http://ci.bukkit.org/job/dev-CraftBukkit/Recommended/artifact/target/craftbukkit-0.0.1-SNAPSHOT.jar" dest="lib/craftbukkit.jar" verbose="false" usetimestamp="true" />
-->
</target>
<target name="compile" description="Compilation target">
<echo>Compiling</echo>
<javac srcdir="." destdir="bin" debug="on" debuglevel="lines,vars,source" classpathref="classpath" includeantruntime="false" />
<copy file="plugin.yml" tofile="bin/plugin.yml"/>
</target>
<target name="processBuildNum" if="env.BUILD_NUMBER">
<echo>Setting build number to b${env.BUILD_NUMBER}</echo>
<replace file="bin/plugin.yml" token="b000" value="b${env.BUILD_NUMBER}" />
</target>
<target name="processNoBuildNum" unless="env.BUILD_NUMBER">
<echo>Setting build number to DEV</echo>
<replace file="bin/plugin.yml" token="b000" value="DEV" />
</target>
<target name="compress" description="Compression target" depends="processBuildNum, processNoBuildNum">
<echo>Compressing</echo>
<jar jarfile="AutoSave.jar" basedir="bin" includes="net/**/*, plugin.yml">
<manifest>
<attribute name="Built-By" value="${user.name}" />
</manifest>
</jar>
<delete dir="bin" />
</target>
</project>