<?xml version="1.0" encoding="UTF-8"?>
<project name="image4j" default="all" basedir=".">
  <property name="src.dir" value="${basedir}/src"/>
  <property name="build.dir" value="${basedir}/build/classes"/>  
  <property name="dist.dir" value="${basedir}/dist"/>
  <property name="docs.dir" value="${basedir}/apidoc"/>

  <property name="ant.build.javac.source" value="1.6"/>
  <property name="ant.build.javac.target" value="1.6"/>
    
  <target name="all" depends="clean,build,jar"/>
  
  <target name="clean">
    <delete dir="${build.dir}"/>
  </target>  
  
  <target name="build" depends="init">
    <javac destdir="${build.dir}" srcdir="${src.dir}"
           source="${ant.build.javac.source}"
           target="${ant.build.javac.target}"
           includeAntRuntime="false">      
    </javac>
  </target>
  
  <target name="jar" depends="build">
    <jar basedir="${build.dir}" file="${dist.dir}/image4j.jar">     
    </jar>
  </target>
  
  <target name="docs" depends="init">
    <mkdir dir="${docs.dir}"/>
    <javadoc destdir="${docs.dir}" windowtitle="image4j" overview="${src.dir}/overview.html">
      <fileset dir="${src.dir}" includes="**/*.java"/>
    </javadoc>
  </target>
  
  <target name="init">
    <mkdir dir="${build.dir}"/>
    <mkdir dir="${dist.dir}"/>
  </target>
  
</project>
