<?xml version="1.0" encoding="utf-8"?>
<project name="OpeningHoursEditor" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
    <!-- enter the SVN commit message -->
    <property name="commit.message" value="fixed main version"/>
    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    <property name="plugin.main.version" value="14153"/>
	
    <property name="plugin.author" value="Falko Thomale"/>
    <property name="plugin.class" value="org.openstreetmap.josm.plugins.ohe.OhePlugin"/>
    <property name="plugin.description" value="extended options for editing opening_hours"/>
    <property name="plugin.icon" value="images/opening_hours.png"/>
    <property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/OpeningHoursEditor"/>
    <property name="plugin.canloadatruntime" value="true"/>

    <!-- ** include targets that all plugins have in common ** -->
    <import file="../build-common.xml"/>
	
	<property name="parser.dir" location="${plugin.src.dir}/org/openstreetmap/josm/plugins/ohe/parser"/>
	
    <target name="javacc" depends="init" unless="javacc.notRequired">
        <ivy:cachepath file="${core.tools.ivy}" pathid="javacc.classpath" conf="javacc"/>
        <java classname="javacc" fork="true" failonerror="true">
            <classpath refid="javacc.classpath"/>
            <arg value="-JDK_VERSION=1.8"/>
            <arg value="-GRAMMAR_ENCODING=UTF-8"/>
            <arg value="-UNICODE_INPUT"/>
            <arg value="-OUTPUT_DIRECTORY=${parser.dir}"/>
            <arg value="${parser.dir}/OpeningTimeCompiler.jj"/>
        </java>
    </target>

	<!--
    **********************************************************
    ** compile - compiles the source tree
    **********************************************************
    -->
    <target name="compile" depends="init, javacc">
        <echo message="compiling sources for ${plugin.jar} ... "/>
        <javac srcdir="src" debug="true" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8">
            <classpath>
                <pathelement path="${plugin.build.dir}"/>
                <pathelement location="${josm}"/>
            </classpath>
            <compilerarg value="-Xlint:deprecation"/>
            <compilerarg value="-Xlint:unchecked"/>
        </javac>
    </target>

</project>
