This repository has been archived on 2021-07-14. You can view files and clone it, but cannot push or open issues or pull requests.
scriptcraft/build.xml

46 lines
1.6 KiB
XML
Raw Normal View History

<project name="scriptcraft" default="package" basedir=".">
<property file="build.properties"/>
<description>Builds the scriptcraft.jar file - a plugin for bukkit</description>
<property name="src" location="src/main/java"/>
<property name="build" location="target/classes"/>
<property name="dist" location="target/" />
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="compile bukkit plugin source">
<javac srcdir="${src}" destdir="${build}" classpath="${bukkit-lib}">
</javac>
</target>
<target name="zip_js">
<zip zipfile="${build}/js-plugins.zip" basedir="./src/main/javascript"/>
</target>
<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>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/scriptcraft-${bukkit-version}-${DSTAMP}.jar" basedir="${build}"/>
</target>
<target name="clean" description="clean up" >
<delete dir="${dist}"/>
</target>
<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"/>
</target>
</project>