Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
120 lines (97 sloc) 3.8 KB
<?xml version="1.0"?>
<project name="jtReversi" default="build" basedir=".">
<property file=".ant.properties"/>
<!-- Define some additional properties for this project. Not required. -->
<!-- Define the tasks. -->
<taskdef name="wtkbuild" classname="de.pleumann.antenna.WtkBuild"/>
<taskdef name="wtkpackage" classname="de.pleumann.antenna.WtkPackage"/>
<taskdef name="wtkrun" classname="de.pleumann.antenna.WtkRun"/>
<target name="clean">
<delete failonerror="false" dir="${classes}" />
<delete failonerror="false" dir="${apidir}" />
<delete failonerror="false" file="${jars}/${project}.jar" />
</target>
<target name="init">
<!-- Make directory for classes -->
<mkdir dir="${classes}"/>
</target>
<target name="build" depends="init">
<!-- Compile everything -->
<wtkbuild srcdir="${src}"
destdir="${classes}"
preverify="true"/>
<!-- Make a copy of the ${classes} directory -->
<copy todir="classes_ktoolbar">
<fileset dir="${classes}"/>
</copy>
<!-- Package everything. Most of the necessary information is
contained in the JAD file. Also preverify the result this
time. To obfuscate everything, set the corresponding
parameter to "true" (requires RetroGuard or Proguard). -->
<wtkpackage jarfile="${jars}/${project}.jar"
jadfile="${jars}/${project}.jad"
obfuscate="true"
preverify="true">
<!-- Package our newly compiled classes and the
resources from the WTK's demo application. -->
<fileset dir="${classes}"/>
<fileset dir="${resources}"/>
</wtkpackage>
<!-- Copy back to classes (for ktoolbar) -->
<move todir="classes">
<fileset dir="classes_ktoolbar"/>
</move>
</target>
<target name="package" depends="build">
<tar destfile="${project}.tar.gz" compression="gzip" >
<tarfileset dir=".">
<include name="src/**/*.java"/>
<include name="res/**"/>
<include name="bin/**"/>
<include name="COPYING"/>
<include name="build.xml"/>
<include name=".ant.properties"/>
<include name="Changelog"/>
<include name="TODO"/>
<include name="README"/>
<include name="DEVICES"/>
</tarfileset>
</tar>
</target>
<target name="doc">
<mkdir dir="${apidir}"/>
<javadoc packagenames="${javadoc.packagenames}"
sourcepath="${src}"
destdir="${apidir}"
author="true"
version="true"
use="true"
classpath="${wtk.home}/lib/midpapi.zip">
<link href="${wtk.home}/docs/api" />
</javadoc>
</target>
<target name="all" depends="clean, package,doc" />
<target name="run">
<wtkrun jadfile="${jars}/${project}.jad" device="${device}"
wait="true" />
</target>
<target name="i85run">
<wtkrun jadfile="${jars}/${project}.jad" device="Motorola_i85s"
wait="true" />
</target>
<target name="grayrun">
<wtkrun jadfile="${jars}/${project}.jad" device="DefaultGrayPhone"
wait="true"/>
</target>
<target name="minrun">
<wtkrun jadfile="${jars}/${project}.jad" device="MinimumPhone"
wait="true" />
</target>
<target name="microrun">
<java classname="com.barteo.emulator.app.Main"
classpath="${microemulator_home}/target/me-app.jar:${jars}/${project}.jar"
fork="yes">
<arg value="${main}"/>
</java>
</target>
</project>