build.xml 1014 B

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="comparator">
  3. <target name="clean" description="Cleanup build artifacts">
  4. <delete dir="${basedir}/vendor"/>
  5. <delete file="${basedir}/composer.lock"/>
  6. </target>
  7. <target name="composer" depends="clean" description="Install dependencies with Composer">
  8. <tstamp>
  9. <format property="thirty.days.ago" pattern="MM/dd/yyyy hh:mm aa" offset="-30" unit="day"/>
  10. </tstamp>
  11. <delete>
  12. <fileset dir="${basedir}">
  13. <include name="composer.phar" />
  14. <date datetime="${thirty.days.ago}" when="before"/>
  15. </fileset>
  16. </delete>
  17. <get src="https://getcomposer.org/composer.phar" dest="${basedir}/composer.phar" skipexisting="true"/>
  18. <exec executable="php">
  19. <arg value="composer.phar"/>
  20. <arg value="install"/>
  21. </exec>
  22. </target>
  23. <target name="phpab" description="Generate autoloader script">
  24. <exec executable="phpab">
  25. <arg value="--output" />
  26. <arg path="tests/autoload.php" />
  27. <arg path="tests" />
  28. </exec>
  29. </target>
  30. </project>