PHP Classes

File: build.xml

Recommend this page to a friend!
  Classes of Maik Greubel   PHP Git Library Provider   build.xml   Download  
File: build.xml
Role: Auxiliary data
Content type: text/plain
Description: Ant build script
Class: PHP Git Library Provider
Manipulate Git repositories using the git command
Author: By
Last change: Update of build.xml
Date: 5 months ago
Size: 11,457 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE project> <project name="GitProvider" default="build"> <!-- By default, we assume all tools to be on the $PATH --> <!-- <property name="toolsdir" value="" /> --> <!-- Uncomment the following when the tools are in ${basedir}/vendor/bin --> <property name="toolsdir" value="${basedir}/vendor/bin/" /> <condition property="is_windows"> <os family="windows" /> </condition> <condition property="is_unix"> <os family="unix" /> </condition> <target name="update-deps-windows" if="is_windows"> <exec executable="composer.cmd" failonerror="true"> <arg value="update" /> </exec> </target> <target name="update-deps-unix" if="is_unix"> <exec executable="composer" failonerror="true"> <arg value="update" /> </exec> </target> <target name="update-deps" depends="update-deps-unix,update-deps-windows" /> <target name="build" depends="prepare,update-deps,lint,phploc-ci,pdepend,phpmd-ci,phpcs-ci,phpcpd-ci,phpunit,phpdox" description="" /> <target name="build-parallel" depends="prepare,update-deps,lint,tools-parallel,phpunit,phpdox" description="" /> <target name="no-update" depends="prepare,lint,tools-parallel,phpunit,phpdox" description="Runs build without updating dependencies" /> <target name="tools-parallel" description="Run tools in parallel"> <parallel threadCount="2"> <sequential> <antcall target="pdepend" /> <antcall target="phpmd-ci" /> </sequential> <antcall target="phpcpd-ci" /> <antcall target="phpcs-ci" /> <antcall target="phploc-ci" /> </parallel> </target> <target name="clean" unless="clean.done" description="Cleanup build artifacts"> <delete dir="${basedir}/build/api" /> <delete dir="${basedir}/build/coverage" /> <delete dir="${basedir}/build/logs" /> <delete dir="${basedir}/build/pdepend" /> <delete dir="${basedir}/build/phpdox" /> <property name="clean.done" value="true" /> </target> <target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build"> <mkdir dir="${basedir}/build/api" /> <mkdir dir="${basedir}/build/coverage" /> <mkdir dir="${basedir}/build/logs" /> <mkdir dir="${basedir}/build/pdepend" /> <mkdir dir="${basedir}/build/phpdox" /> <property name="prepare.done" value="true" /> </target> <target name="lint" description="Perform syntax check of sourcecode files"> <apply executable="php" failonerror="true"> <arg value="-l" /> <fileset dir="${basedir}/src"> <include name="**/*.php" /> <modified /> </fileset> <fileset dir="${basedir}/tests"> <include name="**/*.php" /> <modified /> </fileset> </apply> </target> <target name="phploc" depends="phploc-unix,phploc-windows" description="Measure project size using PHPLOC and print human readable output. Intended for usage on the command line." /> <target name="phploc-windows" if="is_windows"> <exec executable="${toolsdir}phploc.bat"> <arg value="--count-tests" /> <arg path="${basedir}/src" /> <arg path="${basedir}/tests" /> </exec> </target> <target name="phploc-unix" if="is_unix"> <exec executable="${toolsdir}phploc"> <arg value="--count-tests" /> <arg path="${basedir}/src" /> <arg path="${basedir}/tests" /> </exec> </target> <target name="phploc-ci" depends="prepare,phploc-ci-unix,phploc-ci-windows" description="Measure project size using PHPLOC and log result in CSV and XML format. Intended for usage within a continuous integration environment." /> <target name="phploc-ci-windows" if="is_windows"> <exec executable="${toolsdir}phploc.bat"> <arg value="--count-tests" /> <arg value="--log-csv" /> <arg path="${basedir}/build/logs/phploc.csv" /> <arg value="--log-xml" /> <arg path="${basedir}/build/logs/phploc.xml" /> <arg path="${basedir}/src" /> <arg path="${basedir}/tests" /> </exec> </target> <target name="phploc-ci-unix" if="is_unix"> <exec executable="${toolsdir}phploc"> <arg value="--count-tests" /> <arg value="--log-csv" /> <arg path="${basedir}/build/logs/phploc.csv" /> <arg value="--log-xml" /> <arg path="${basedir}/build/logs/phploc.xml" /> <arg path="${basedir}/src" /> <arg path="${basedir}/tests" /> </exec> </target> <target name="pdepend" depends="prepare,pdepend-unix,pdepend-windows" description="Calculate software metrics using PHP_Depend and log result in XML format. Intended for usage within a continuous integration environment." /> <target name="pdepend-windows" if="is_windows"> <exec executable="${toolsdir}pdepend.bat"> <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" /> <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" /> <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" /> <arg path="${basedir}/src" /> </exec> </target> <target name="pdepend-unix" if="is_unix"> <exec executable="${toolsdir}pdepend"> <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" /> <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" /> <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" /> <arg path="${basedir}/src" /> </exec> </target> <target name="phpmd" depends="phpmd-unix,phpmd-windows" description="Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing." /> <target name="phpmd-windows" if="is_windows"> <exec executable="${toolsdir}phpmd.bat"> <arg path="${basedir}/src" /> <arg value="text" /> <arg path="${basedir}/phpmd.xml" /> </exec> </target> <target name="phpmd-unix" if="is_windows"> <exec executable="${toolsdir}phpmd"> <arg path="${basedir}/src" /> <arg value="text" /> <arg path="${basedir}/phpmd.xml" /> </exec> </target> <target name="phpmd-ci" depends="prepare,phpmd-ci-unix,phpmd-ci-windows" description="Perform project mess detection using PHPMD and log result in XML format. Intended for usage within a continuous integration environment." /> <target name="phpmd-ci-windows" if="is_windows"> <exec executable="${toolsdir}phpmd.bat"> <arg path="${basedir}/src" /> <arg value="xml" /> <arg path="${basedir}/phpmd.xml" /> <arg value="--reportfile" /> <arg path="${basedir}/build/logs/pmd.xml" /> </exec> </target> <target name="phpmd-ci-unix" if="is_unix"> <exec executable="${toolsdir}phpmd"> <arg path="${basedir}/src" /> <arg value="xml" /> <arg path="${basedir}/phpmd.xml" /> <arg value="--reportfile" /> <arg path="${basedir}/build/logs/pmd.xml" /> </exec> </target> <target name="phpcs" description="Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing." /> <target name="phpcs-windows" if="is_windows"> <exec executable="${toolsdir}phpcs.bat"> <arg value="--standard=PSR2" /> <arg value="--extensions=php" /> <arg value="--ignore=autoload.php" /> <arg value="--report=xml" /> <arg value="--report-file=build/logs/phpcs.log" /> <arg path="${basedir}/src" /> <arg path="${basedir}/tests" /> </exec> </target> <target name="phpcs-unix" if="is_unix"> <exec executable="${toolsdir}phpcs"> <arg value="--standard=PSR2" /> <arg value="--extensions=php" /> <arg value="--ignore=autoload.php" /> <arg path="${basedir}/src" /> <arg path="${basedir}/tests" /> </exec> </target> <target name="phpcs-ci" depends="prepare,phpcs-ci-unix,phpcs-ci-windows" description="Find coding standard violations using PHP_CodeSniffer and log result in XML format. Intended for usage within a continuous integration environment." /> <target name="phpcs-ci-windows" if="is_windows"> <exec executable="${toolsdir}phpcs.bat"> <arg value="--report=checkstyle" /> <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" /> <arg value="--standard=PSR2" /> <arg value="--extensions=php" /> <arg value="--ignore=autoload.php" /> <arg path="${basedir}/src" /> </exec> </target> <target name="phpcs-ci-unix" if="is_unix"> <exec executable="${toolsdir}phpcs" output="/dev/null"> <arg value="--report=checkstyle" /> <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" /> <arg value="--standard=PSR2" /> <arg value="--extensions=php" /> <arg value="--ignore=autoload.php" /> <arg path="${basedir}/src" /> </exec> </target> <target name="phpcpd" depends="phpcpd-unix,phpcpd-windows" description="Find duplicate code using PHPCPD and print human readable output. Intended for usage on the command line before committing." /> <target name="phpcpd-windows" if="is_windows"> <exec executable="${toolsdir}phpcpd.bat"> <arg path="${basedir}/src" /> </exec> </target> <target name="phpcpd-unix" if="is_unix"> <exec executable="${toolsdir}phpcpd"> <arg path="${basedir}/src" /> </exec> </target> <target name="phpcpd-ci" depends="prepare,phpcpd-ci-unix,phpcpd-ci-windows" description="Find duplicate code using PHPCPD and log result in XML format. Intended for usage within a continuous integration environment." /> <target name="phpcpd-ci-windows" if="is_windows"> <exec executable="${toolsdir}phpcpd.bat"> <arg value="--log-pmd" /> <arg path="${basedir}/build/logs/pmd-cpd.xml" /> <arg path="${basedir}/src" /> </exec> </target> <target name="phpcpd-ci-unix" if="is_unix"> <exec executable="${toolsdir}phpcpd"> <arg value="--log-pmd" /> <arg path="${basedir}/build/logs/pmd-cpd.xml" /> <arg path="${basedir}/src" /> </exec> </target> <target name="phpunit" depends="prepare,phpunit-unix,phpunit-windows" description="Run unit tests with PHPUnit" /> <target name="phpunit-windows" if="is_windows"> <exec executable="${toolsdir}phpunit.bat" failonerror="true"> <arg value="--configuration" /> <arg path="${basedir}/phpunit.xml" /> <arg value="--coverage-clover" /> <arg path="${basedir}/build/logs/clover.xml" /> <arg value="--coverage-crap4j" /> <arg path="${basedir}/build/logs/crap4j.xml" /> <arg value="--log-junit" /> <arg path="${basedir}/build/logs/junit.xml" /> <arg value="--coverage-html" /> <arg path="${basedir}/build/coverage/html" /> <arg value="--coverage-xml" /> <arg path="${basedir}/build/coverage/xml" /> </exec> </target> <target name="phpunit-unix" if="is_unix"> <exec executable="${toolsdir}phpunit" failonerror="true"> <arg value="--configuration" /> <arg path="${basedir}/phpunit.xml" /> <arg value="--coverage-clover" /> <arg path="${basedir}/build/logs/clover.xml" /> <arg value="--coverage-crap4j" /> <arg path="${basedir}/build/logs/crap4j.xml" /> <arg value="--log-junit" /> <arg path="${basedir}/build/logs/junit.xml" /> <arg value="--coverage-html" /> <arg path="${basedir}/build/coverage/html" /> <arg value="--coverage-xml" /> <arg path="${basedir}/build/coverage/xml" /> </exec> </target> <target name="phpdox" depends="phploc-ci,phpcs-ci,phpmd-ci,phpdox-unix,phpdox-windows" description="Generate project documentation using phpDox" /> <target name="phpdox-windows" if="is_windows"> <exec executable="${toolsdir}phpdox.bat" dir="${basedir}" /> </target> <target name="phpdox-unix" if="is_unix"> <exec executable="${toolsdir}phpdox" dir="${basedir}" /> </target> </project>