<project name="Personal Issue Tracker" default="package">
    <property file="version.properties"/>
    <property environment="env"/>

    <property
        name="libpit.jar"
        value="libpit/release/pit-${application.version}.jar"/>

    <target name="clean">
        <ant dir="libpit" target="clean" inheritAll="false"/>
        <ant dir="pit-cli" target="clean" inheritAll="false"/>
        <!-- <ant dir="pit-swing" target="clean" inheritAll="false"/> -->
    </target>

    <target name="libpit">
        <ant dir="libpit" target="release" inheritAll="false"/>
    </target>

    <target name="pit-cli" depends="libpit">
        <copy file="${libpit.jar}" todir="pit-cli/lib"/>
        <ant dir="pit-cli" target="release" inheritAll="false"/>
    </target>

    <!-- <target name="pit-swing" depends="libpit">
        <copy file="${libpit.jar}" todir="pit-swing/lib"/>
        <ant dir="pit-swing" fork="true" target="package" inheritAll="false"/>
    </target> -->

    <!-- <target name="package" depends="libpit,pit-cli,pit-swing"> -->
    <target name="package" depends="libpit,pit-cli">
        <mkdir dir="release/lib"/>
        <copy file="pit-cli/release/pit-clii-${application.version}.jar" todir="release"/>
        <!-- <copy file="pit-swing/dist/jar/pit-swing.jar"
                   tofile="release/pit-swing-${application.version}.jar"/> -->
        <copy file="libpit/release/pit-${application.version}.jar" todir="release/lib"/>
    </target>
</project>
