Update build script to auto download dependencies.

This commit is contained in:
ElgarL committed 2013-01-27 00:53:26 +00:00
1 parent 635ba69e94
commit 94067ae14d
1 file changed
+44 -34
+44 -34
View File
@@ -1,38 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project name="TownyChat" default="jar" basedir="."> <project name="TownyChat" default="jar" basedir=".">
<property name="build" value="bin"/> <property name="build" value="bin" />
<property file="build.properties"/> <property file="build.properties" />
<target name="clean">
<delete dir="${build}"/>
</target>
<target name="init" depends="clean"> <target name="clean">
<mkdir dir="${build}"/> <delete dir="${build}" />
</target> </target>
<target name="compile" depends="init"> <target name="init" depends="clean">
<!-- Compile the java code --> <mkdir dir="${build}" />
<javac srcdir="src" destdir="${build}" includeantruntime="false" target="1.6" source="1.6" debug="true"> </target>
<classpath>
<pathelement location="${env.LIB}/bukkit.jar"/> <target name="download" depends="init">
<pathelement location="${env.LIB}/craftbukkit.jar"/>
<pathelement location="${env.LIB}/Towny.jar"/> <get src="http://palmergames.com/libs/bukkit.jar" dest="${env.LIB}/bukkit.jar" skipexisting="true" />
<pathelement location="${env.LIB}/Essentials.jar"/> <get src="http://palmergames.com/libs/Towny.jar" dest="${env.LIB}/Towny.jar" skipexisting="true" />
<pathelement location="${env.LIB}/CraftIRC.jar"/> <get src="http://palmergames.com/libs/Essentials.jar" dest="${env.LIB}/Essentials.jar" skipexisting="true" />
<pathelement location="${env.LIB}/dynmap-api.jar"/> <get src="http://palmergames.com/libs/CraftIRC.jar" dest="${env.LIB}/CraftIRC.jar" skipexisting="true" />
<pathelement location="${env.LIB}/HeroicDeath.jar"/> <get src="http://palmergames.com/libs/dynmap-api.jar" dest="${env.LIB}/dynmap-api.jar" skipexisting="true" />
</classpath> <get src="http://palmergames.com/libs/HeroicDeath.jar" dest="${env.LIB}/HeroicDeath.jar" skipexisting="true" />
</javac>
</target> </target>
<target name="jar" depends="compile"> <target name="compile" depends="download">
<!-- Build the jar file --> <!-- Compile the java code -->
<jar basedir="${build}" destfile="${env.LIB}/TownyChat.jar"> <javac srcdir="src" destdir="${build}" includeantruntime="false" target="1.6" source="1.6" debug="true">
<fileset dir="./src" includes="changelog.txt"/> <classpath>
<fileset dir="./src" includes="Channels.yml"/> <pathelement location="${env.LIB}/bukkit.jar" />
<fileset dir="./src" includes="ChatConfig.yml"/> <pathelement location="${env.LIB}/Towny.jar" />
<fileset dir="./src" includes="plugin.yml"/> <pathelement location="${env.LIB}/Essentials.jar" />
</jar> <pathelement location="${env.LIB}/CraftIRC.jar" />
</target> <pathelement location="${env.LIB}/dynmap-api.jar" />
<pathelement location="${env.LIB}/HeroicDeath.jar" />
</classpath>
</javac>
</target>
<target name="jar" depends="compile">
<!-- Build the jar file -->
<jar basedir="${build}" destfile="${env.LIB}/TownyChat.jar">
<fileset dir="./src" includes="changelog.txt" />
<fileset dir="./src" includes="Channels.yml" />
<fileset dir="./src" includes="ChatConfig.yml" />
<fileset dir="./src" includes="plugin.yml" />
</jar>
</target>
</project> </project>