Added a more flexible, easier to use, build script

This commit is contained in:
Jeremy Wood committed 2012-04-16 16:21:16 -04:00
1 parent 15451e6a19
commit 28991f3518
2 files changed
+42 -4

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
#===================================
# File Name: build.properties
#===================================
env.LIB=..//lib
evn.DIR=.//src
+36 -4
View File
@@ -1,6 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="TownyChat" default="makejar" basedir=".">
<target name ="makejar" description="Create a jar for the TownyChat project">
<jar jarfile="../lib/TownyChat.jar" includes="**" basedir="bin"/>
</target>
<project name="TownyChat" default="jar" basedir=".">
<property name="build" value="target"/>
<property file="build.properties"/>
<target name="clean">
<delete dir="${build}"/>
</target>
<target name="init" depends="clean">
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init">
<!-- Compile the java code -->
<javac srcdir="src" destdir="${build}">
<classpath>
<pathelement location="${env.LIB}/bukkit.jar"/>
<pathelement location="${env.LIB}/craftbukkit.jar"/>
<pathelement location="${env.LIB}/Towny.jar"/>
<pathelement location="${env.LIB}/Essentials.jar"/>
<pathelement location="${env.LIB}/CraftIRC.jar"/>
<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>