forked from EngineHub/CraftBook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-mechanisms.xml
35 lines (30 loc) · 1.78 KB
/
build-mechanisms.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
<project name="CraftBookMechanisms" default="dist" basedir=".">
<target name="compile" depends="init">
<javac srcdir="${src.dir}/mechanisms" deprecation="true"
includeantruntime="true" destdir="${build.dir}/mechanisms" debug="true">
<classpath>
<pathelement location="${build.dir}/common" />
<fileset refid="libs"/>
</classpath>
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="${dist.dir}/mechanisms"/>
<!-- Make the manifest -->
<manifest file="${dist.dir}/mechanisms/manifest.mf" mode="replace">
<attribute name="Implementation-Title" value="CraftBook (mechanisms)"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="CraftBook-Version" value="${version}"/>
<attribute name="Class-Path" value="CraftBook.jar WorldEdit.jar ../WorldEdit.jar"/>
</manifest>
<!-- Make the plugin.yml file -->
<delete file="${build.dir}/mechanisms/plugin.yml"/>
<copy tofile="${build.dir}/mechanisms/plugin.yml" file="${src.dir}/mechanisms/resources/plugin.yml"/>
<replace file="${build.dir}/mechanisms/plugin.yml" token="__VERSION_MACRO__" value="${version}"/>
<mkdir dir="${build.dir}/mechanisms/defaults"/>
<copy tofile="${build.dir}/mechanisms/defaults/config.yml" file="${src.dir}/mechanisms/resources/config.yml"/>
<copy tofile="${build.dir}/mechanisms/defaults/books.txt" file="${src.dir}/mechanisms/resources/books.txt"/>
<copy tofile="${build.dir}/mechanisms/defaults/cauldron-recipes.txt" file="${src.dir}/mechanisms/resources/cauldron-recipes.txt"/>
<jar jarfile="${dist.dir}/CraftBookMechanisms.jar" basedir="${build.dir}/mechanisms" manifest="${dist.dir}/mechanisms/manifest.mf"/>
</target>
</project>