-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
49 lines (41 loc) · 1.46 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="wafflescentials">
<property name="bukkit-location" value="../lib/bukkit.jar"/>
<property name="output-jar" value="${ant.project.name}.jar"/>
<property name="src" value="src"/>
<property name="rsrc" value="src/main/resources"/>
<property name="debuglevel" value="source,lines"/>
<path id="classpath">
<pathelement location="bin"/>
<pathelement location="${bukkit-location}"/>
</path>
<loadfile srcFile="${rsrc}/plugin.yml" property="version">
<filterchain>
<linecontainsregexp>
<regexp pattern="^version:\s*.*$"/>
</linecontainsregexp>
<tokenfilter>
<replaceregex pattern="^version:\s*(.*)$" replace="\1"/>
</tokenfilter>
<striplinebreaks/>
</filterchain>
</loadfile>
<target name="init">
<mkdir dir="bin"/>
<copy file="${rsrc}/plugin.yml" todir="bin" />
</target>
<target name="clean">
<delete dir="bin"/>
<delete file="${output-jar}"/>
</target>
<target depends="init" name="build">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false">
<src path="${src}"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="dist" depends="build">
<jar destfile="${output-jar}" basedir="bin" />
</target>
</project>