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"/>
|
2013-09-11 20:14:35 -07:00
|
|
|
<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" />
|
2015-03-03 07:10:20 -08:00
|
|
|
<property name="groovy-version" value="2.4.1" />
|
2014-09-03 10:15:41 -07:00
|
|
|
|
2013-01-05 22:13:41 -08:00
|
|
|
<path id="classpath">
|
|
|
|
<fileset dir="${lib}">
|
|
|
|
<include name="**/*.jar" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
2014-09-03 10:15:41 -07:00
|
|
|
|
2014-09-03 14:14:02 -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-11-30 21:01:19 -08:00
|
|
|
<get src="http://search.maven.org/remotecontent?filepath=org/codehaus/groovy/groovy-all/${groovy-version}/groovy-all-${groovy-version}-indy.jar"
|
2013-09-11 22:16:04 -07:00
|
|
|
dest="${lib}/groovy-all-${groovy-version}.jar"
|
|
|
|
skipexisting="true" />
|
2013-10-27 20:04:31 -07:00
|
|
|
<echo message="downloading MigLayout to ${lib}"/>
|
|
|
|
<get src="http://repo1.maven.org/maven2/com/miglayout/miglayout-core/4.2/miglayout-core-4.2.jar"
|
|
|
|
dest="${lib}/miglayout-core-4.2.jar"
|
2014-05-27 01:23:30 -07:00
|
|
|
skipexisting="true" />
|
2013-10-27 20:04:31 -07:00
|
|
|
<get src="http://repo1.maven.org/maven2/com/miglayout/miglayout-swing/4.2/miglayout-swing-4.2.jar"
|
|
|
|
dest="${lib}/miglayout-swing-4.2.jar"
|
|
|
|
skipexisting="true" />
|
2014-05-27 01:23:30 -07:00
|
|
|
<echo message="downloading Apache Commons IO to ${lib}"/>
|
2014-04-17 06:54:48 -07:00
|
|
|
<get src="http://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar"
|
|
|
|
dest="${lib}/commons-io-2.4.jar"
|
2014-05-26 23:30:12 -07:00
|
|
|
skipexisting="true" />
|
|
|
|
<echo message="downloading Trident animation library to ${lib}"/>
|
|
|
|
<get src="http://repo1.maven.org/maven2/org/pushingpixels/trident/1.3/trident-1.3.jar"
|
|
|
|
dest="${lib}/trident-1.3.jar"
|
2014-05-27 01:23:30 -07:00
|
|
|
skipexisting="true" />
|
2014-09-03 10:15:41 -07:00
|
|
|
<echo message="downloading java json library to ${lib}"/>
|
|
|
|
<get src="http://repo1.maven.org/maven2/org/json/json/20140107/json-20140107.jar"
|
2014-09-03 22:34:56 -07:00
|
|
|
dest="${lib}/json-20140107.jar"
|
2014-09-03 10:15:41 -07:00
|
|
|
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">
|
2014-07-06 04:27:36 -07:00
|
|
|
<javac includeantruntime="false" debug="true" debuglevel="${debuglevel}" encoding="UTF-8" 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>
|
2014-09-03 14:14:02 -07:00
|
|
|
|
2011-05-21 00:30:57 -07:00
|
|
|
<!-- jar (default target) - Create .jar file -->
|
|
|
|
<target depends="build" name="jar">
|
2015-03-06 17:56:06 -08:00
|
|
|
<jar destfile="release/Magarena.jar" basedir="build" includes="**/*.*">
|
2011-05-21 00:30:57 -07:00
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="magic.MagicMain" />
|
2014-11-15 12:42:01 -08:00
|
|
|
<attribute name="SplashScreen-Image" value="magic/data/textures/splash.png" />
|
2014-09-03 22:34:56 -07:00
|
|
|
<attribute name="Class-Path" value="lib/groovy-all-${groovy-version}.jar lib/json-20140107.jar lib/miglayout-core-4.2.jar lib/miglayout-swing-4.2.jar lib/commons-io-2.4.jar lib/trident-1.3.jar" />
|
2011-05-21 00:30:57 -07:00
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
</target>
|
2015-03-06 17:56:06 -08:00
|
|
|
|
|
|
|
<target depends="build" name="core">
|
|
|
|
<jar destfile="release/Magarena-core.jar" basedir="build" includes="**/*.*" excludes="magic/*,magic/ui/**">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Class-Path" value="lib/groovy-all-${groovy-version}.jar lib/json-20140107.jar lib/commons-io-2.4.jar lib/trident-1.3.jar" />
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
</target>
|
2011-05-21 00:30:57 -07:00
|
|
|
|
|
|
|
<!-- javadoc - Generate Javadoc -->
|
|
|
|
<target name="javadoc">
|
|
|
|
<javadoc sourcepath="src" destdir="javadoc" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|