Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
130 lines (112 sloc) 3.4 KB
<?xml version="1.0" encoding="UTF-8"?>
<project name="lattice testing" default="build">
<target name="create">
<exec executable="git">
<arg value="submodule"/>
<arg value="init"/>
</exec>
<exec executable="git">
<arg value="submodule"/>
<arg value="update"/>
</exec>
<exec executable="git" dir="src">
<arg value="checkout"/>
<arg value="master"/>
</exec>
<exec executable="git" dir="src/lattice">
<arg value="checkout"/>
<arg value="master"/>
</exec>
<ant dir="src" target="checkout"/>
</target>
<target name="test" depends="clean, prepare, phploc, pdepend, phpdoc, phpcpd, phpmd, phpcb"/>
<target name="clean">
<delete dir="build"/>
</target>
<target name="pull">
<exec executable="git" dir="lattice">
<arg value="checkout"/>
<arg value="master"/>
</exec>
<exec executable="git" dir="lattice">
<arg value="pull"/>
</exec>
</target>
<target name="prepare">
<mkdir dir="build"/>
<mkdir dir="build/logs"/>
<mkdir dir="build/pdepend"/>
<mkdir dir="build/coverage"/>
<mkdir dir="build/api"/>
<mkdir dir="build/code-browser"/>
</target>
<target name="phploc">
<exec executable="phploc">
<arg value="--log-csv" />
<arg value="${basedir}/build/logs/phploc.csv"/>
<arg value="${basedir}/src/lattice"/>
</exec>
</target>
<target name="pdepend">
<exec executable="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 value="${basedir}/src/lattice"/>
</exec>
</target>
<target name="phpdoc">
<exec executable="phpdoc">
<arg value="--directory"/>
<arg path="${basedir}/src/lattice"/>
<arg value="--target" />
<arg path="${basedir}/build/api"/>
</exec>
</target>
<target name="phpcb">
<exec executable="phpcb">
<arg value="--log" />
<arg path="${basedir}/build/logs"/>
<arg value="--source"/>
<arg path="${basedir}/src/lattice"/>
<arg value="--output" />
<arg path="${basedir}/build/code-browser"/>
</exec>
</target>
<target name="phpcpd">
<exec executable="phpcpd">
<arg value="--log-pmd"/>
<arg value="${basedir}/build/logs/pmd-cpd.xml"/>
<arg path="${basedir}/src/lattice"/>
</exec>
</target>
<target name="phpcs">
<exec executable="phpcs" output="/dev/null">
<arg value="--report=checkstyle"/>
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml"/>
<arg value="--standard=${basedir}/settings/phpcs.xml"/>
<arg path="${basedir}/src/lattic"/>
</exec>
</target>
<target name="phpmd"
description="Perform project mess detection using PHPMD">
<exec executable="phpmd">
<arg path="${basedir}/src/lattice/" />
<arg value="xml" />
<arg value="${basedir}/settings/phpmd.xml" />
<arg value="--reportfile" />
<arg value="${basedir}/build/logs/pmd.xml" />
</exec>
</target>
<target name="lint">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}/src">
<include name="**/*.php" />
</fileset>
<fileset dir="${basedir}/tests">
<include name="**/*.php" />
</fileset>
</apply>
</target>
</project>