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

    <target name="-init-clover-initstring" unless="clover.init.string">
        <property name="clover.init.string" location=".clover/clover.db"/>
    </target>

    <target name="-init-clover" depends="-init-clover-initstring">
        <path id="clover.classpath">
            <fileset dir="lib" includes="*clover*.jar"/>
            <fileset dir="${clover.search.path}" includes="*clover*.jar"/>
        </path>

        <taskdef resource="cloverlib.xml" classpathref="clover.classpath"/>
        <taskdef resource="cloverjunitlib.xml" classpathref="clover.classpath"/>

        <condition property="clover.installed">
            <and>
                <available classname="com.cenqua.clover.CloverInstr"/>
                <or>
                    <available file="lib/clover.license"/>
                    <available file="${clover.search.path}/clover.license"/>
                </or>
            </and>
        </condition>
    </target>

    <target name="with.clover" depends="-init-clover" if="clover.installed"
            description="Set up Clover to instrument tests.">
        <clover-env/>
        <clover-setup initstring="${clover.init.string}"/>
    </target>

    <target name="compile-for-tests" depends="clean,with.clover,compile"/>

</project>

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

    <target name="-init-clover-initstring" unless="clover.init.string">
        <property name="clover.init.string" location=".clover/clover.db"/>
    </target>

    <target name="-init-clover" depends="-init-clover-initstring">
        <path id="clover.classpath">
            <fileset dir="lib" includes="*clover*.jar"/>
            <fileset dir="${clover.search.path}" includes="*clover*.jar"/>
        </path>

        <taskdef resource="cloverlib.xml" classpathref="clover.classpath"/>
        <taskdef resource="cloverjunitlib.xml" classpathref="clover.classpath"/>

        <condition property="clover.installed">
            <and>
                <available classname="com.cenqua.clover.CloverInstr"/>
                <or>
                    <available file="lib/clover.license"/>
                    <available file="${clover.search.path}/clover.license"/>
                    <available file="${clover.license.path}"/>
                </or>
            </and>
        </condition>
    </target>

    <target name="with.clover" depends="-init-clover" if="clover.installed"
            description="Set up Clover to instrument tests.">
        <clover-env/>
        <clover-setup initstring="${clover.init.string}"/>
    </target>

    <target name="compile-for-tests" depends="clean,with.clover,compile"/>

</project>

Allow the clover licence to be set explicitly.
Allow the clover licence to be set explicitly.

Change-Id: I63ae0fdbf399f6e0df6378bf43a63becb06eda91
Reviewed-on: http://gerrit.dmdirc.com/2732
Reviewed-by: Greg Holmes <79e2475f81a6317276bf7cbb3958b20d289b78df@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
