<targetname="prepare"depends="clean"unless="prepare.done"description="Prepare for build">
<mkdirdir="build/api"/>
<mkdirdir="build/coverage"/>
<mkdirdir="build/logs"/>
<mkdirdir="build/pdepend"/>
<mkdirdir="build/phpdox"/>
<propertyname="prepare.done"value="true"/>
</target>
<targetname="lint"unless="lint.done"description="Perform syntax check of sourcecode files">
<applyexecutable="php"taskname="lint">
<argvalue="-l"/>
<filesetdir="src">
<includename="**/*.php"/>
</fileset>
<filesetdir="tests">
<includename="**/*.php"/>
</fileset>
</apply>
<propertyname="lint.done"value="true"/>
</target>
<targetname="phploc"unless="phploc.done"description="Measure project size using PHPLOC and print human readable output. Intended for usage on the command line.">
<execexecutable="${phploc}"taskname="phploc">
<argvalue="--count-tests"/>
<argpath="src"/>
<argpath="tests"/>
</exec>
<propertyname="phploc.done"value="true"/>
</target>
<targetname="phploc-ci"depends="prepare"unless="phploc.done"description="Measure project size using PHPLOC and log result in CSV and XML format. Intended for usage within a continuous integration environment.">
<execexecutable="${phploc}"taskname="phploc">
<argvalue="--count-tests"/>
<argvalue="--log-csv"/>
<argpath="build/logs/phploc.csv"/>
<argvalue="--log-xml"/>
<argpath="build/logs/phploc.xml"/>
<argpath="src"/>
<argpath="tests"/>
</exec>
<propertyname="phploc.done"value="true"/>
</target>
<targetname="pdepend"depends="prepare"unless="pdepend.done"description="Calculate software metrics using PHP_Depend and log result in XML format. Intended for usage within a continuous integration environment.">
<targetname="phpcpd"unless="phpcpd.done"description="Find duplicate code using PHPCPD and print human readable output. Intended for usage on the command line before committing.">
<execexecutable="${phpcpd}"taskname="phpcpd">
<argpath="src"/>
</exec>
<propertyname="phpcpd.done"value="true"/>
</target>
<targetname="phpcpd-ci"depends="prepare"unless="phpcpd.done"description="Find duplicate code using PHPCPD and log result in XML format. Intended for usage within a continuous integration environment.">
<execexecutable="${phpcpd}"taskname="phpcpd">
<argvalue="--log-pmd"/>
<argpath="build/logs/pmd-cpd.xml"/>
<argpath="src"/>
</exec>
<propertyname="phpcpd.done"value="true"/>
</target>
<targetname="phpunit"unless="phpunit.done"depends="prepare"description="Run unit tests with PHPUnit">
<execexecutable="${phpunit}"taskname="phpunit">
<argvalue="--configuration"/>
<argpath="build/phpunit.xml"/>
</exec>
<propertyname="phpunit.done"value="true"/>
</target>
<targetname="phpunit-no-coverage"depends="prepare"unless="phpunit.done"description="Run unit tests with PHPUnit (without generating code coverage reports)">