updated to reflect new directory layout
This commit is contained in:
parent
17dddb1dc9
commit
d8a43116d4
1 changed files with 24 additions and 28 deletions
52
build.xml
52
build.xml
|
@ -1,49 +1,45 @@
|
||||||
<project name="scriptcraft" default="bukkit-dist" basedir=".">
|
<project name="scriptcraft" default="package" basedir=".">
|
||||||
<property file="build.properties"/>
|
<property file="build.properties"/>
|
||||||
<description>Builds the scriptcraft.jar file - a plugin for bukkit</description>
|
<description>Builds the scriptcraft.jar file - a plugin for bukkit</description>
|
||||||
<property name="bukkit" location="bukkit-plugin"/>
|
<property name="src" location="src/main/java"/>
|
||||||
<property name="src" location="${bukkit}/src"/>
|
<property name="build" location="target/classes"/>
|
||||||
<property name="build" location="${bukkit}/build"/>
|
<property name="dist" location="target/" />
|
||||||
<property name="dist" location="./" />
|
|
||||||
|
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<tstamp/>
|
<tstamp/>
|
||||||
<mkdir dir="${build}"/>
|
<mkdir dir="${build}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="bukkit-compile" depends="init" description="compile bukkit plugin source">
|
<target name="compile" depends="init" description="compile bukkit plugin source">
|
||||||
<javac srcdir="${src}" destdir="${build}" classpath="${bukkit-lib}">
|
<javac srcdir="${src}" destdir="${build}" classpath="${bukkit-lib}">
|
||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<target name="zip_js">
|
<target name="zip_js">
|
||||||
<zip zipfile="${build}/js-plugins.zip" basedir="./js-plugins"/>
|
<zip zipfile="${build}/js-plugins.zip" basedir="./src/main/javascript"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="bukkit-dist" depends="zip_js,bukkit-compile"
|
<target name="package" depends="zip_js,compile"
|
||||||
description="generate the distribution" >
|
description="generate the distribution" >
|
||||||
<!-- Create the distribution directory -->
|
<copy file="src/main/resources/plugin.yml" todir="${build}"/>
|
||||||
<mkdir dir="${dist}/lib"/>
|
<replace file="${build}/plugin.yml" value="${bukkit-version}-${DSTAMP}">
|
||||||
<copy file="bukkit-plugin/plugin.yml" todir="${build}"/>
|
<replacetoken>[[version]]</replacetoken>
|
||||||
<replace file="${build}/plugin.yml" value="${bukkit-version}-${DSTAMP}">
|
</replace>
|
||||||
<replacetoken>[[version]]</replacetoken>
|
|
||||||
</replace>
|
|
||||||
|
|
||||||
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
||||||
<jar jarfile="${dist}/scriptcraft-${bukkit-version}-${DSTAMP}.jar" basedir="${build}"/>
|
<jar jarfile="${dist}/scriptcraft-${bukkit-version}-${DSTAMP}.jar" basedir="${build}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean" description="clean up" >
|
<target name="clean" description="clean up" >
|
||||||
<delete dir="${build}"/>
|
<delete dir="${dist}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="update-live-cb" depends="bukkit-dist" description="Copy the built plugin to the live craftbukkit folder for testing.">
|
<target name="update-live-cb" depends="package" description="Copy the built plugin to the live craftbukkit folder for testing.">
|
||||||
<!--delete dir="${craftbukkit}/js-plugins" /-->
|
<delete>
|
||||||
<delete>
|
<fileset dir="${craftbukkit}/plugins/" includes="scriptcraft*.*"/>
|
||||||
<fileset dir="${craftbukkit}/plugins/" includes="scriptcraft*.*"/>
|
</delete>
|
||||||
</delete>
|
<copy file="${dist}/scriptcraft-${bukkit-version}-${DSTAMP}.jar" todir="${craftbukkit}/plugins"/>
|
||||||
<copy file="${dist}/scriptcraft-${bukkit-version}-${DSTAMP}.jar" todir="${craftbukkit}/plugins"/>
|
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
Reference in a new issue