<?xml version="1.0" encoding="utf-8"?>
<project name="comfort0" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">

    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    <property name="plugin.main.version" value="19044"/>
    <property name="plugin.canloadatruntime" value="true"/>

    <property name="plugin.author" value="simon04"/>
    <property name="plugin.class" value="net.simon04.comfort0.Comfort0Plugin"/>
    <property name="plugin.description" value="Allows editing data in Level0L format"/>
    <property name="plugin.icon" value="images/theta.svg"/>
    <property name="plugin.link" value="https://josm.openstreetmap.de/wiki/Help/Plugin/Comfort0"/>

    <!-- ** include targets that all plugins have in common ** -->
    <import file="../build-common.xml"/>

    <property name="parser.dir" location="src/net/simon04/comfort0/level0l"/>
    <target name="pre-compile" depends="javacc"/>
    <target name="javacc" depends="init,init-ivy" unless="javacc.notRequired">
        <ivy:settings file="${josm.ivysettings}" />
        <ivy:cachepath file="${core.tools.ivy}" pathid="javacc.classpath" conf="javacc"/>
        <mkdir dir="${parser.dir}/parsergen"/>
        <java classname="javacc" fork="true" failonerror="true">
            <classpath refid="javacc.classpath"/>
            <arg value="-DEBUG_PARSER=false"/>
            <arg value="-DEBUG_TOKEN_MANAGER=false"/>
            <arg value="-JDK_VERSION=1.${java.lang.version}"/>
            <arg value="-GRAMMAR_ENCODING=UTF-8"/>
            <arg value="-OUTPUT_DIRECTORY=${parser.dir}/parsergen"/>
            <arg value="${parser.dir}/Level0LParser.jj"/>
        </java>
    </target>

</project>
