This repository has been archived by the owner on Aug 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
77 lines (64 loc) · 2.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0"?>
<project name="Stats" basedir="." default="build">
<property name="bin" value="bin" />
<property name="dist" value="dist" />
<property name="src" value="src" />
<property name="name" value="Stats" />
<property name="version" value="0.99.2" />
<property name="resources" value="resources" />
<property name="author" value="nidefawl" />
<path id="classpath">
<pathelement location="lib/Achievements.jar" />
<pathelement location="lib/craftbukkit-0.0.1-SNAPSHOT.jar" />
<pathelement location="lib/EssentialsGroupManager.jar" />
<pathelement location="lib/Permissions.jar" />
</path>
<buildnumber file=".build.number" />
<!-- Anwendung bauen -->
<target name="build" description="Build the plugin" depends="zip" />
<!-- Clean up -->
<target name="clean.dist" description="Deletes temporary build files">
<delete dir="${dist}" />
</target>
<!-- Delete temporary build files -->
<target name="clean.classes" description="Deletes temporary build files">
<delete dir="${bin}" />
<delete>
<fileset dir="." includes="**/*~" defaultexcludes="no"/>
</delete>
</target>
<!-- Compile the source code -->
<target name="compile" depends="clean.classes, clean.dist">
<mkdir dir="bin" />
<javac srcdir="${src}"
destdir="${bin}"
debug="false"
deprecation="true"
optimize="true" >
<classpath refid="classpath" />
</javac>
</target>
<!-- Build a jar file -->
<target name="jar" depends="compile">
<copy file="${resources}/plugin.yml" tofile="${bin}/plugin.yml">
<filterchain>
<replacetokens>
<token key="VERSION" value="${version}-b${build.number}" />
<token key="NAME" value="${name}" />
<token key="AUTHOR" value="${author}" />
</replacetokens>
</filterchain>
</copy>
<jar jarfile="${dist}/${name}.jar">
<fileset dir="${bin}"/>
<fileset dir="${src}" includes="**/*.java" />
</jar>
</target>
<!-- build a zip file -->
<target name="zip" depends="jar" description="Zip .jar and config.yml into a zip file">
<zip destfile="${dist}/${name}-${version}-b${build.number}.zip">
<fileset dir="${dist}" includes="${name}.jar" />
<zipfileset dir="${resources}" includes="config.yml" prefix="${name}" />
</zip>
</target>
</project>