109 lines
3.4 KiB
XML
109 lines
3.4 KiB
XML
<project name="GoGame" default="dist" basedir=".">
|
|
|
|
<description>Simple Framework for Testing Tree Search and Monte-Carlo Go</description>
|
|
|
|
<property name="src" location="src" />
|
|
<property name="reports" location="reports" />
|
|
<property name="build" location="build" />
|
|
<property name="dist" location="dist" />
|
|
<property name="test" location="test" />
|
|
<property name="docs" location="docs" />
|
|
<property name="lib" location="lib" />
|
|
|
|
<path id="build.classpath">
|
|
<fileset dir="${lib}">
|
|
<include name="**/*.jar" />
|
|
</fileset>
|
|
</path>
|
|
|
|
<path id="classpath.test">
|
|
<path refid="build.classpath" />
|
|
<pathelement location="lib/junit-4.10.jar" />
|
|
<pathelement location="${build}" />
|
|
</path>
|
|
|
|
<target name="compile" depends="init" description="compile the source ">
|
|
<!-- Compile the java code from ${src} into ${build} -->
|
|
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" classpathref="build.classpath" debug="true"/>
|
|
</target>
|
|
|
|
<target name="compile-test" depends="compile">
|
|
<javac srcdir="${test}" destdir="${build}" debug="true">
|
|
<classpath refid="classpath.test" />
|
|
</javac>
|
|
</target>
|
|
|
|
<target name="copy-resources">
|
|
<copy todir="${dist}" file="connect.bat" />
|
|
<copy todir="${dist}" file="rrt.bat" />
|
|
<copy todir="${dist}" file="data/log4j.xml" />
|
|
<copy todir="${dist}" file="data/kgsGtp.ini" />
|
|
<copy todir="${dist}" file="data/gogame.cfg" />
|
|
|
|
<!--copy todir="${dist}/data">
|
|
<fileset dir="data" />
|
|
</copy-->
|
|
|
|
<copy todir="${build}/net/woodyfolsom/msproj/gui">
|
|
<fileset dir="${src}/net/woodyfolsom/msproj/gui">
|
|
<exclude name="**/*.java"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${build}/net/woodyfolsom/msproj/sfx">
|
|
<fileset dir="${src}/net/woodyfolsom/msproj/sfx">
|
|
<exclude name="**/*.java"/>
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="copy-libs">
|
|
<copy todir="${dist}/lib">
|
|
<fileset dir="lib" />
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="clean" description="clean up">
|
|
<!-- Delete the ${build} and ${dist} directory trees -->
|
|
<delete dir="${build}" />
|
|
<delete dir="${dist}" />
|
|
<delete dir="${reports}" />
|
|
</target>
|
|
|
|
<target name="dist" depends="compile,copy-resources,copy-libs" description="generate the distribution">
|
|
<jar jarfile="${dist}/GoGame.jar">
|
|
<fileset dir="${build}" excludes="**/*Test.class" />
|
|
<manifest>
|
|
<attribute name="Main-Class" value="net.woodyfolsom.msproj.StandAloneGame" />
|
|
<attribute name="Class-Path" value="lib/kgsGtp.jar lib/log4j-1.2.16.jar lib/antlrworks-1.4.3.jar lib/encog-engine-2.5.0.jar lib/neuroph-2.6.jar"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<!-- Creates Javadoc -->
|
|
<target name="docs" depends="compile">
|
|
<javadoc packagenames="src" sourcepath="${src}" destdir="${docs}">
|
|
<!-- Define which files / directory should get included, we include all -->
|
|
<fileset dir="${src}">
|
|
<include name="**" />
|
|
</fileset>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<target name="init">
|
|
<!-- Create the build directory structure used by compile -->
|
|
<mkdir dir="${build}" />
|
|
<mkdir dir="${reports}" />
|
|
</target>
|
|
|
|
<target name="test" depends="compile-test">
|
|
<junit haltonfailure="true">
|
|
<classpath refid="classpath.test" />
|
|
<formatter type="xml" />
|
|
<batchtest todir="${reports}">
|
|
<fileset dir="${build}" includes="**/*Test.class" />
|
|
</batchtest>
|
|
</junit>
|
|
</target>
|
|
|
|
</project>
|