2013-01-22 00:11:28 +01:00
|
|
|
<project name="scriptcraft" default="package" basedir=".">
|
2013-01-13 18:00:30 +01:00
|
|
|
<property file="build.properties"/>
|
|
|
|
<description>Builds the scriptcraft.jar file - a plugin for bukkit</description>
|
2013-01-22 00:11:28 +01:00
|
|
|
<property name="src" location="src/main/java"/>
|
|
|
|
<property name="build" location="target/classes"/>
|
|
|
|
<property name="dist" location="target/" />
|
2013-01-15 20:15:40 +01:00
|
|
|
|
2013-01-13 18:00:30 +01:00
|
|
|
<target name="init">
|
2013-01-22 00:11:28 +01:00
|
|
|
<tstamp/>
|
|
|
|
<mkdir dir="${build}"/>
|
2013-01-13 18:00:30 +01:00
|
|
|
</target>
|
|
|
|
|
2013-01-22 00:11:28 +01:00
|
|
|
<target name="compile" depends="init" description="compile bukkit plugin source">
|
|
|
|
<javac srcdir="${src}" destdir="${build}" classpath="${bukkit-lib}">
|
|
|
|
</javac>
|
2013-01-13 18:00:30 +01:00
|
|
|
</target>
|
2013-01-22 00:11:28 +01:00
|
|
|
|
|
|
|
|
2013-01-15 22:11:18 +01:00
|
|
|
|
2013-01-13 18:00:30 +01:00
|
|
|
<target name="zip_js">
|
2013-01-22 00:11:28 +01:00
|
|
|
<zip zipfile="${build}/js-plugins.zip" basedir="./src/main/javascript"/>
|
2013-01-13 18:00:30 +01:00
|
|
|
</target>
|
|
|
|
|
2013-01-22 00:11:28 +01:00
|
|
|
<target name="package" depends="zip_js,compile"
|
|
|
|
description="generate the distribution" >
|
|
|
|
<copy file="src/main/resources/plugin.yml" todir="${build}"/>
|
|
|
|
<replace file="${build}/plugin.yml" value="${bukkit-version}-${DSTAMP}">
|
|
|
|
<replacetoken>[[version]]</replacetoken>
|
|
|
|
</replace>
|
2013-01-15 22:11:18 +01:00
|
|
|
|
2013-01-13 18:00:30 +01:00
|
|
|
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
|
|
|
<jar jarfile="${dist}/scriptcraft-${bukkit-version}-${DSTAMP}.jar" basedir="${build}"/>
|
|
|
|
</target>
|
2013-01-14 23:55:39 +01:00
|
|
|
|
2013-01-13 18:00:30 +01:00
|
|
|
<target name="clean" description="clean up" >
|
2013-01-22 00:11:28 +01:00
|
|
|
<delete dir="${dist}"/>
|
2013-01-13 18:00:30 +01:00
|
|
|
</target>
|
|
|
|
|
2013-01-22 00:11:28 +01:00
|
|
|
<target name="update-live-cb" depends="package" description="Copy the built plugin to the live craftbukkit folder for testing.">
|
|
|
|
<delete>
|
|
|
|
<fileset dir="${craftbukkit}/plugins/" includes="scriptcraft*.*"/>
|
|
|
|
</delete>
|
|
|
|
<copy file="${dist}/scriptcraft-${bukkit-version}-${DSTAMP}.jar" todir="${craftbukkit}/plugins"/>
|
2013-01-14 23:55:39 +01:00
|
|
|
</target>
|
2013-01-13 18:00:30 +01:00
|
|
|
</project>
|