<?xml version="1.0" encoding="UTF-8"?>
<project name="mkrelease" default="mkrelease" basedir=".">

    <!-- build plugin using build.xml which was created by eclipse2ant -->
    <import file="build.xml" />

    <!-- should match plugin.xml -->
    <property name="plugin.version" value="1.0.0" />
    <property name="plugin.name" value="eclipse2ant" />
    <property name="plugin.jar" value="${plugin.name}_${plugin.version}.jar" />
    <property name="plugin.src" value="src" />
    <property name="plugin.classes" value="classes" />
    
    <!-- same contents as bin.includes in build.properties (keep in sync!) -->
    <property name="bin.includes" value="
        .classpath
        .project
        build.properties
        build.xml
        build-mkrelease.xml
        changelog.html
        doc/**
        icons/**
        images/**
        plugin.properties
        plugin.xml
        readme.html" />

    <!-- common part for all plugin projects, no editing beyond this line required -->
    <target name="mkrelease" description="compile plugin" depends="clean,build,jar" />

    <target name="clean">
        <ant antfile="build.xml" target="clean" inheritall="false" />
        <delete file="${plugin.jar}" />
    </target>

    <target name="jar">
        <jar destfile="${plugin.name}.jar">
            <fileset dir="${plugin.classes}" />
        </jar>
        <zip destfile="${plugin.name}src.zip">
            <fileset dir="${plugin.src}" />
        </zip>
        <jar destfile="${plugin.jar}">
            <fileset dir="." includes="${bin.includes}">
                <include name="${plugin.name}.jar" />
                <include name="${plugin.name}src.zip" />
            </fileset>
               </jar>
    </target>

</project>