forked from EngineHub/CraftBook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
96 lines (86 loc) · 3.54 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<project name="CraftBook" default="dist" basedir=".">
<description>
CraftBook adds interactive mechanics, Redstone features, and
Minecart enhancements to Minecraft SMP.</description>
<property name="src.dir" location="src" />
<property name="build.dir" location="build" />
<property name="dist.dir" location="dist" />
<property name="release.dir" location="release" />
<property name="lib.dir" location="lib" />
<fileset id="libs" dir="${lib.dir}">
<include name="Bukkit.jar" />
<include name="Craftbukkit.jar" />
<include name="WorldEdit.jar" />
</fileset>
<import file="build-common.xml" />
<import file="build-mechanisms.xml" />
<import file="build-circuits.xml" />
<import file="build-vehicles.xml" />
<target name="init">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/common" />
<mkdir dir="${build.dir}/mechanisms" />
<mkdir dir="${build.dir}/circuits" />
<mkdir dir="${build.dir}/vehicles" />
</target>
<!-- Compile the source files -->
<target name="compile" depends="init">
<sequential>
<antcall target="CraftBookCommon.compile"/>
<antcall target="CraftBookMechanisms.compile"/>
<antcall target="CraftBookCircuits.compile"/>
<antcall target="CraftBookVehicles.compile"/>
</sequential>
</target>
<!-- Build the .jar -->
<target name="jar" depends="compile">
<sequential>
<antcall target="CraftBookCommon.jar"/>
<antcall target="CraftBookMechanisms.jar"/>
<antcall target="CraftBookCircuits.jar"/>
<antcall target="CraftBookVehicles.jar"/>
</sequential>
</target>
<!-- Create the .jar -->
<target name="dist">
<property name="version" value="nightly"/>
<antcall target="jar"/>
</target>
<!-- Build a release -->
<target name="release" depends="clean">
<input message="Enter version:" addproperty="version"/>
<antcall target="jar"/>
<delete dir="${release.dir}"/>
<mkdir dir="${release.dir}"/>
<copy tofile="${release.dir}/README.txt" file="README.txt"/>
<copy tofile="${release.dir}/LICENSE.txt" file="LICENSE.txt"/>
<copy tofile="${release.dir}/CHANGELOG.txt" file="CHANGELOG.txt"/>
<copy tofile="${release.dir}/PERLSTONE-v1.0.txt" file="PERLSTONE-v1.0.txt"/>
<copy tofile="${release.dir}/CraftBook.jar" file="${dist.dir}/CraftBook.jar"/>
<copy tofile="${release.dir}/CraftBookMechanisms.jar" file="${dist.dir}/CraftBookMechanisms.jar"/>
<copy tofile="${release.dir}/CraftBookCircuits.jar" file="${dist.dir}/CraftBookCircuits.jar"/>
<copy tofile="${release.dir}/CraftBookVehicles.jar" file="${dist.dir}/CraftBookVehicles.jar"/>
<zip destfile="${release.dir}/craftbook-${version}.zip" basedir="${release.dir}" excludes="*.zip plugin.yml common mechanisms"/>
<mkdir dir="${release.dir}/src"/>
<copy todir="${release.dir}/src">
<fileset dir="${src.dir}"/>
</copy>
<zip destfile="${release.dir}/craftbook-${version}-src.zip" basedir="${release.dir}" excludes="*.zip plugin.yml common mechanisms"/>
</target>
<!-- Clean the output -->
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${release.dir}"/>
</target>
<!-- Run JFlex
<target name="run-jflex">
<taskdef classname="JFlex.anttask.JFlexTask" name="jflex">
<classpath>
<pathelement location="${lib.dir}/JFlex.jar" />
</classpath>
</taskdef>
WARNING: Hardcoded. JFlex's Ant task is horrible.
<jflex file="src/com/sk89q/craftbook/ic/custom/CustomICScanner.lex" destdir="${src.dir}" />
</target> -->
</project>