1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="php-token-stream">
3 <target name="clean" description="Cleanup build artifacts">
4 <delete dir="${basedir}/vendor"/>
5 <delete file="${basedir}/composer.lock"/>
8 <target name="composer" depends="clean" description="Install dependencies with Composer">
10 <format property="thirty.days.ago" pattern="MM/dd/yyyy hh:mm aa" offset="-30" unit="day"/>
13 <fileset dir="${basedir}">
14 <include name="composer.phar" />
15 <date datetime="${thirty.days.ago}" when="before"/>
19 <get src="https://getcomposer.org/composer.phar" dest="${basedir}/composer.phar" skipexisting="true"/>
21 <exec executable="php">
22 <arg value="composer.phar"/>
23 <arg value="install"/>
27 <target name="phpunit" description="Run unit tests with PHPUnit">
28 <exec executable="${basedir}/vendor/bin/phpunit" failonerror="true">
29 <arg value="--configuration"/>
30 <arg path="${basedir}/build/phpunit.xml"/>