aa0fe0f87c
We now have a Transform interface and a bevy of implementations of varying generality: identity, rigid body, uniform scaling, non-uniform scaling, and affine. Along the way, Vector was added, APIs were tidied up, bits were twiddled, but no platonic shapes were harmed.
85 lines
3.7 KiB
XML
85 lines
3.7 KiB
XML
<?xml version="1.0"?>
|
|
<project name="pythagoras" default="compile" basedir="." xmlns:artifact="urn:maven-artifact-ant">
|
|
<property name="src.dir" location="src/main/java"/>
|
|
<property name="test.dir" location="src/test/java"/>
|
|
<property name="target.dir" location="target"/>
|
|
<property name="classes.dir" location="${target.dir}/classes"/>
|
|
<property name="tclasses.dir" location="${target.dir}/test-classes"/>
|
|
<property name="javadoc.dir" location="${target.dir}/docs"/>
|
|
|
|
<property name="ooo-build.vers" value="2.6"/>
|
|
<ant antfile="etc/bootstrap.xml"/>
|
|
<import file="${user.home}/.m2/ooo-build/${ooo-build.vers}/ooo-build.xml"/>
|
|
|
|
<target name="-prepare" depends="-init-ooo">
|
|
<mkdir dir="${target.dir}"/>
|
|
<mavendep pom="pom.xml"/>
|
|
<mavendep pom="pom.xml" id="test" scope="test"/>
|
|
<path id="test.classpath">
|
|
<path refid="test.path"/>
|
|
<pathelement location="${classes.dir}"/>
|
|
<pathelement location="${tclasses.dir}"/>
|
|
</path>
|
|
</target>
|
|
|
|
<target name="clean" description="Deletes all build results.">
|
|
<delete dir="${target.dir}"/>
|
|
</target>
|
|
|
|
<target name="compile" depends="-prepare" description="Compiles the code.">
|
|
<mkdir dir="${classes.dir}"/>
|
|
<copy todir="${classes.dir}"><fileset dir="src/main/resources" includes="**"/></copy>
|
|
<ooojavac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="pom.xml.path"/>
|
|
|
|
<mkdir dir="${tclasses.dir}"/>
|
|
<javac srcdir="${test.dir}" destdir="${tclasses.dir}" includeAntRuntime="false"
|
|
debug="on" optimize="${build.optimize}" source="1.6" target="1.6" encoding="utf-8">
|
|
<classpath refid="test.classpath"/>
|
|
<compilerarg value="-Xlint"/>
|
|
<compilerarg value="-Xlint:-serial"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<target name="javadoc" depends="-prepare" description="Generates javadoc documentation.">
|
|
<mkdir dir="${javadoc.dir}"/>
|
|
<javadoc windowtitle="${ant.project.name} API" doctitle="${ant.project.name} API"
|
|
access="public" destdir="${javadoc.dir}" additionalparam="-breakiterator">
|
|
<packageset dir="${src.dir}"/>
|
|
<classpath refid="classpath"/>
|
|
<link href="http://download.oracle.com/javase/1.5.0/docs/api/"/>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<target name="test" depends="compile" description="Runs the unit tests.">
|
|
<!-- allows passing -Dtest=NamePrefix to restrict to subset of tests -->
|
|
<property name="test" value=""/>
|
|
<taskdef name="unit" classpathref="test.path"
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
|
|
<mkdir dir="${target.dir}/test-reports"/>
|
|
<unit printsummary="off" haltonfailure="yes" fork="${junit.fork}">
|
|
<classpath refid="test.classpath"/>
|
|
<sysproperty key="com.samskivert.depot.debug" value="${debug}"/>
|
|
<formatter type="brief" usefile="false"/>
|
|
<formatter type="xml"/>
|
|
<batchtest todir="${target.dir}/test-reports">
|
|
<fileset dir="${test.dir}" includes="**/${test}*Test.java"/>
|
|
</batchtest>
|
|
</unit>
|
|
</target>
|
|
|
|
<!-- todo: depend on tests target -->
|
|
<target name="package" depends="compile" description="Compiles code and builds jar file.">
|
|
<jar destfile="${target.dir}/${ant.project.name}.jar">
|
|
<fileset dir="${src.dir}" includes="**"/> <!-- for use by GWT apps -->
|
|
<!-- this must follow src.dir so that Platform.java is properly overwritten -->
|
|
<fileset dir="${classes.dir}" includes="**"/>
|
|
</jar>
|
|
</target>
|
|
|
|
<property name="maven.install.repo" value="file://${user.home}/.m2/repository"/>
|
|
<target name="install" depends="package"
|
|
description="Deploys our build artifacts to a Maven repository.">
|
|
<mavendeploy file="${target.dir}/${ant.project.name}.jar" srcdir="${src.dir}" pom="pom.xml"/>
|
|
</target>
|
|
</project>
|