magarena/build.xml

85 lines
2.8 KiB
XML
Raw Normal View History

2011-05-21 00:30:57 -07:00
<project name="Magarena" basedir="." default="jar">
<description>
ANT Build file for Magarena.
</description>
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
2013-01-05 22:13:41 -08:00
<property name="lib" value="release/lib" />
2013-09-11 22:16:04 -07:00
<property name="groovy-version" value="2.1.7-indy" />
2013-01-05 22:13:41 -08:00
<path id="classpath">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>
2013-09-28 22:59:47 -07:00
<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="lib/appbundler-1.0.jar" />
2013-01-05 22:13:41 -08:00
<!-- deps - Download dependencies -->
<target name="deps" unless="skip.download">
<echo message="downloading groovy to ${lib}"/>
2013-09-11 22:16:04 -07:00
<get src="http://search.maven.org/remotecontent?filepath=org/codehaus/groovy/groovy-all/2.1.7/groovy-all-${groovy-version}.jar"
dest="${lib}/groovy-all-${groovy-version}.jar"
skipexisting="true" />
2013-01-05 22:13:41 -08:00
</target>
2011-05-21 00:30:57 -07:00
<!-- init - Create temporary directory to build the program -->
<target name="init">
2013-01-05 22:13:41 -08:00
<mkdir dir="build"/>
<mkdir dir="${lib}"/>
2011-05-21 00:30:57 -07:00
</target>
<!-- clean - Remove temporary directory -->
<target name="clean">
<delete dir="build"/>
</target>
<!-- build - Compile sources and copy resources to build directory -->
2013-01-05 22:13:41 -08:00
<target depends="init,deps" name="build">
<javac includeantruntime="false" debug="true" debuglevel="${debuglevel}" destdir="build" source="${source}" target="${target}">
2011-06-18 20:03:18 -07:00
<src path="src"/>
<compilerarg value="-Xlint"/>
2013-01-05 22:13:41 -08:00
<classpath refid="classpath" />
2011-05-21 00:30:57 -07:00
</javac>
<copy includeemptydirs="false" todir="build">
<fileset dir="resources">
<exclude name="**/.svn"/>
</fileset>
</copy>
</target>
<!-- jar (default target) - Create .jar file -->
<target depends="build" name="jar">
<jar destfile="release/Magarena.jar" basedir="build" includes="**/*.*">
2011-05-21 00:30:57 -07:00
<manifest>
<attribute name="Main-Class" value="magic.MagicMain" />
<attribute name="SplashScreen-Image" value="magic/data/textures/logo.jpg" />
2013-08-30 20:59:37 -07:00
<attribute name="Class-Path" value="lib/groovy-all-${groovy-version}.jar" />
2011-05-21 00:30:57 -07:00
</manifest>
</jar>
</target>
2013-09-28 22:59:47 -07:00
<target name="bundle-magarena">
<bundleapp outputdirectory="dist"
name="Magarena"
displayname="Magarena"
shortversion="1.42"
signature="Maga"
icon="arena.icns"
identifier="magic.MagicMain"
mainclassname="magic.MagicMain">
<option value="-Dapple.laf.useScreenMenuBar=true -Xms256M -Xmx256M"></option>
</bundleapp>
</target>
2011-05-21 00:30:57 -07:00
<!-- javadoc - Generate Javadoc -->
<target name="javadoc">
<javadoc sourcepath="src" destdir="javadoc" />
</target>
</project>