<project name="methods" default="dist">

  <target name="compile">

    <mkdir dir="bin" />
    <javac source="17"
           target="17"
           srcdir="src"
           destdir="bin"
           debug="true"
           includeantruntime="true"
           nowarn="true">

    </javac>
  </target>

  <target name="dist" depends="compile">
    <jar basedir="bin" destfile="methods.jar" />
  </target>

  <target name="demo" depends="dist">
    <mkdir dir="demo" />

    <copy todir="demo">
      <fileset file="../src/processing/core/PApplet.java" />
      <fileset file="../src/processing/core/PGraphics.java" />
      <fileset file="../src/processing/core/PImage.java" />
    </copy>

    <taskdef name="methods"
             classname="PAppletMethods"
             classpath="methods.jar" />
    <methods dir="demo"/>
  </target>

  <target name="clean">
    <delete dir="bin" />
    <delete file="methods.jar" />
  </target>

</project>
