2010-12-26 18:38:42 +00:00
|
|
|
<project name="WorldEdit" default="dist" basedir=".">
|
|
|
|
<description>WorldEdit allows for editing the Minecraft SMP world
|
|
|
|
en-masse, de-griefing, and fixing issues.</description>
|
2011-05-01 02:04:03 +00:00
|
|
|
|
|
|
|
<property name="src.dir" location="src/main"/>
|
2011-05-01 03:08:14 +00:00
|
|
|
<property name="resources.dir" location="src/main/resources"/>
|
2010-12-26 18:38:42 +00:00
|
|
|
<property name="build.dir" location="build"/>
|
|
|
|
<property name="dist.dir" location="dist"/>
|
|
|
|
<property name="release.dir" location="release"/>
|
|
|
|
<property name="lib.dir" location="lib"/>
|
2011-01-22 09:36:43 +00:00
|
|
|
<property name="docs.dir" location="docs"/>
|
|
|
|
|
|
|
|
<fileset dir="${lib.dir}" id="libs">
|
|
|
|
<include name="truezip.jar" />
|
|
|
|
<include name="Bukkit.jar" />
|
2011-01-30 22:59:59 +00:00
|
|
|
<include name="Craftbukkit.jar" />
|
2011-01-22 09:36:43 +00:00
|
|
|
<include name="Permissions.jar" />
|
2011-01-22 21:34:05 +00:00
|
|
|
<include name="js.jar" />
|
2011-01-31 03:49:57 +00:00
|
|
|
<include name="worldeditsunrhino.jar" />
|
2011-03-14 03:23:55 +00:00
|
|
|
<include name="jchronic.jar" />
|
2011-01-22 09:36:43 +00:00
|
|
|
</fileset>
|
2011-01-01 01:41:10 +00:00
|
|
|
|
2010-12-26 18:38:42 +00:00
|
|
|
<target name="init">
|
|
|
|
<mkdir dir="${build.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Compile the source files -->
|
|
|
|
<target name="compile" depends="init">
|
|
|
|
<javac srcdir="${src.dir}" deprecation="true" includeantruntime="true" destdir="${build.dir}" debug="true">
|
|
|
|
<classpath>
|
2011-01-22 09:36:43 +00:00
|
|
|
<fileset refid="libs"/>
|
2010-12-26 18:38:42 +00:00
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Build the .jar -->
|
|
|
|
<target name="jar" depends="compile">
|
|
|
|
<mkdir dir="${dist.dir}"/>
|
|
|
|
<manifest file="manifest.mf" mode="replace">
|
|
|
|
<attribute name="Implementation-Title" value="WorldEdit"/>
|
|
|
|
<attribute name="Implementation-Version" value="${version}"/>
|
|
|
|
<attribute name="WorldEdit-Version" value="${version}"/>
|
2011-01-22 21:34:05 +00:00
|
|
|
<attribute name="Class-Path" value="truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar"/>
|
2011-01-08 21:08:43 +00:00
|
|
|
<!--<attribute name="Main-Class" value="com.sk89q.worldedit.cli.Main"/>-->
|
2010-12-26 18:38:42 +00:00
|
|
|
</manifest>
|
2011-01-18 01:11:05 +00:00
|
|
|
<delete file="${build.dir}/plugin.yml"/>
|
2011-05-01 02:04:03 +00:00
|
|
|
<copy tofile="${build.dir}/plugin.yml" file="${resources.dir}/plugin.yml"/>
|
|
|
|
<replace file="${build.dir}/plugin.yml" token="%VERSION%" value="${version}"/>
|
2011-01-17 10:52:57 +00:00
|
|
|
<mkdir dir="${build.dir}/defaults"/>
|
2011-05-01 02:04:03 +00:00
|
|
|
<copy tofile="${build.dir}/defaults/config.yml" file="${resources.dir}/config.yml"/>
|
2011-01-31 03:49:57 +00:00
|
|
|
<jar jarfile="${dist.dir}/WorldEdit.jar" basedir="${build.dir}" manifest="manifest.mf">
|
2011-03-14 03:23:55 +00:00
|
|
|
<zipgroupfileset dir="lib" includes="worldeditsunrhino.jar" />
|
|
|
|
<zipgroupfileset dir="lib" includes="jchronic.jar" />
|
2011-01-31 03:49:57 +00:00
|
|
|
</jar>
|
2010-12-26 18:38:42 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Create the .jar -->
|
|
|
|
<target name="dist">
|
|
|
|
<property name="version" value="nightly"/>
|
|
|
|
<antcall target="jar"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Build a release -->
|
|
|
|
<target name="release">
|
|
|
|
<input message="Enter version:" addproperty="version"/>
|
|
|
|
<antcall target="jar"/>
|
|
|
|
<delete dir="${release.dir}"/>
|
|
|
|
<mkdir dir="${release.dir}"/>
|
2011-01-23 00:46:42 +00:00
|
|
|
<copy todir="${release.dir}/craftscripts">
|
|
|
|
<fileset dir="craftscripts"/>
|
|
|
|
</copy>
|
2011-01-17 10:52:57 +00:00
|
|
|
<copy tofile="${release.dir}/CHANGELOG.txt" file="CHANGELOG.txt"/>
|
|
|
|
<copy tofile="${release.dir}/LICENSE.txt" file="LICENSE.txt"/>
|
|
|
|
<copy tofile="${release.dir}/NOTICE.txt" file="NOTICE.txt"/>
|
|
|
|
<copy tofile="${release.dir}/README.txt" file="README.txt"/>
|
2011-05-01 02:04:03 +00:00
|
|
|
<replace file="${release.dir}/README.txt" token="$${project.version}" value="${version}"/>
|
2010-12-26 18:38:42 +00:00
|
|
|
<copy tofile="${release.dir}/WorldEdit.jar" file="${dist.dir}/WorldEdit.jar"/>
|
2011-01-08 21:13:40 +00:00
|
|
|
<zip destfile="${release.dir}/worldedit-${version}.zip" basedir="${release.dir}" excludes="*.zip plugin.yml"/>
|
2010-12-26 18:38:42 +00:00
|
|
|
<mkdir dir="${release.dir}/src"/>
|
|
|
|
<copy todir="${release.dir}/src">
|
|
|
|
<fileset dir="${src.dir}"/>
|
|
|
|
</copy>
|
2011-01-08 21:13:40 +00:00
|
|
|
<zip destfile="${release.dir}/worldedit-${version}-src.zip" basedir="${release.dir}" excludes="*.zip plugin.yml"/>
|
2010-12-26 18:38:42 +00:00
|
|
|
</target>
|
|
|
|
|
2011-01-22 09:36:43 +00:00
|
|
|
<!-- Javadoc -->
|
|
|
|
<target name="javadoc">
|
|
|
|
<javadoc access="public" author="true" destdir="${docs.dir}" doctitle="WorldEdit API" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.6" sourcepath="src" splitindex="true" use="true" version="true">
|
|
|
|
<classpath>
|
|
|
|
<fileset refid="libs"/>
|
|
|
|
</classpath>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
2010-12-26 18:38:42 +00:00
|
|
|
<!-- Clean the output -->
|
|
|
|
<target name="clean">
|
|
|
|
<delete dir="${build.dir}"/>
|
|
|
|
<delete dir="${dist.dir}"/>
|
|
|
|
<delete dir="${release.dir}"/>
|
2011-01-22 09:36:43 +00:00
|
|
|
<delete dir="${docs.dir}"/>
|
2010-12-26 18:38:42 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!--<target name="-get-version-git" if="git-revision">
|
|
|
|
<sequential>
|
|
|
|
<exec executable="git" failifexecutionfails="false" outputproperty="git-revision">
|
|
|
|
<arg value="rev-parse"/>
|
|
|
|
<arg value="HEAD"/>
|
|
|
|
</exec>
|
|
|
|
<exec executable="git" outputproperty="git-revision-dirty">
|
|
|
|
<arg value="diff"/>
|
|
|
|
<arg value="- -shortstat"/>
|
|
|
|
</exec>
|
|
|
|
<condition else="dev-${git-revision}-modified" property="version" value="dev-${git-revision}">
|
|
|
|
<equals arg1="" arg2="${git-revision-dirty}"/>
|
|
|
|
</condition>
|
|
|
|
</sequential>
|
|
|
|
</target>-->
|
|
|
|
</project>
|