mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 19:16:41 +01:00
133 lines
4.9 KiB
XML
133 lines
4.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project name="MobArena" default="dist" basedir=".">
|
|
<property name="pluginname" value="MobArena" />
|
|
|
|
<!-- Folders -->
|
|
<property name="src" location="src" />
|
|
<property name="bin" location="build" />
|
|
<property name="lib" location="lib" />
|
|
<property name="res" location="resources" />
|
|
<property name="server" location="D:\General\Java\Eclipse\Minecraft\Minecraft Server\plugins" />
|
|
|
|
<property name="ability-src" location="abilities" />
|
|
<property name="ability-dest" location="${res}/res/abilities" />
|
|
|
|
<!-- Dependency variables -->
|
|
<property name="cbver" value="1.2.4-R1.0" />
|
|
<property name="cbjar" value="craftbukkit-${cbver}.jar" />
|
|
<property name="cburl" value="http://repo.bukkit.org/content/repositories/releases/org/bukkit/craftbukkit/${cbver}/${cbjar}" />
|
|
|
|
<property name="vltver" value="1.2.12" />
|
|
<property name="vltjar" value="Vault-${vltver}-SNAPSHOT.jar" />
|
|
<property name="vlturl" value="http://ci.milkbowl.net/job/Vault/Recommended%20Build/artifact/target/${vltjar}" />
|
|
|
|
<property name="herojar" value="Heroes.jar" />
|
|
<property name="herourl" value="http://ci.milkbowl.net/job/Heroes/Heroic%20Build/artifact/build/${herojar}" />
|
|
|
|
<property name="sptjar" value="SpoutPluginAPI.jar" />
|
|
<property name="spturl" value="http://ci.spout.org/job/SpoutPluginAPI/Recommended/artifact/target/${sptjar}" />
|
|
|
|
<property name="msjar" value="MagicSpells.jar" />
|
|
<property name="msurl" value="http://dev.bukkit.org/media/files/577/281/${msjar}" />
|
|
|
|
|
|
<path id="classpath">
|
|
<fileset dir="${lib}" includes="*.jar" />
|
|
<pathelement location="${bin}" />
|
|
</path>
|
|
|
|
<target name="clean">
|
|
<delete dir="${bin}" />
|
|
</target>
|
|
|
|
<target name="prepare-bin">
|
|
<mkdir dir="${bin}" />
|
|
</target>
|
|
|
|
<target name="prepare-lib">
|
|
<mkdir dir="${lib}" />
|
|
</target>
|
|
|
|
<target name="prepare-abilities">
|
|
<mkdir dir="${ability-dest}" />
|
|
</target>
|
|
|
|
<!--<target name="copy-abilities">
|
|
<mkdir dir="${ability-dest}" />
|
|
<copy toDir="${ability-dest}">
|
|
<fileset dir="${ability-src}" />
|
|
</copy>
|
|
</target>-->
|
|
|
|
<target name="cleanup-abilities">
|
|
<delete dir="${ability-dest}" />
|
|
</target>
|
|
|
|
<!-- Builds the source code -->
|
|
<target name="build-src" depends="prepare-bin">
|
|
<javac target="1.6" source="1.6"
|
|
srcdir="${src}" destdir="${bin}"
|
|
debug="on" debuglevel="lines,vars,source"
|
|
includeantruntime="no">
|
|
<compilerarg value="-Xbootclasspath/p:${toString:classpath}"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<!-- Builds the source code and shows deprecation issues -->
|
|
<target name="build-src-with-deprecation-check" depends="prepare-bin">
|
|
<javac target="1.6" source="1.6"
|
|
srcdir="${src}" destdir="${bin}"
|
|
debug="on" debuglevel="lines,vars,source"
|
|
includeantruntime="no">
|
|
<compilerarg value="-Xlint:deprecation"/>
|
|
<compilerarg value="-Xbootclasspath/p:${toString:classpath}"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<!-- Builds the ability source code and places it in the resources folder -->
|
|
<target name="build-abilities" depends="prepare-abilities">
|
|
<javac target="1.6" source="1.6"
|
|
srcdir="${ability-src}" destdir="${ability-dest}"
|
|
debug="on" debuglevel="lines,vars,source"
|
|
includeantruntime="no">
|
|
<compilerarg value="-Xbootclasspath/p:${toString:classpath}"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<!-- Build a .jar and copy to server's plugins-folder -->
|
|
<target name="dist" depends="build-src-with-deprecation-check, build-abilities">
|
|
<delete file="${pluginname}.jar" />
|
|
<jar jarfile="${pluginname}.jar">
|
|
<!-- Include the class-files (bin) and the resources (res) -->
|
|
<fileset dir="${bin}" />
|
|
<fileset dir="${res}" />
|
|
</jar>
|
|
<!-- Copy to server -->
|
|
<copy file="${pluginname}.jar" tofile="${server}/${pluginname}.jar" />
|
|
<delete dir="${ability-dest}" />
|
|
</target>
|
|
|
|
<!-- Download all dependency jars from the given URLs -->
|
|
<target name="download-dependencies" depends="prepare-lib">
|
|
<get src="${cburl}"
|
|
dest="${lib}/${cbjar}"
|
|
usetimestamp="true"
|
|
skipexisting="true" />
|
|
<get src="${vlturl}"
|
|
dest="${lib}/${vltjar}"
|
|
usetimestamp="true"
|
|
skipexisting="true" />
|
|
<get src="${herourl}"
|
|
dest="${lib}/${herojar}"
|
|
usetimestamp="true"
|
|
skipexisting="true" />
|
|
<get src="${spturl}"
|
|
dest="${lib}/${sptjar}"
|
|
usetimestamp="true"
|
|
skipexisting="true" />
|
|
<get src="${msurl}"
|
|
dest="${lib}/${msjar}"
|
|
usetimestamp="true"
|
|
skipexisting="true" />
|
|
</target>
|
|
</project> |