-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
59 lines (50 loc) · 2.54 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<project name="CubeObject\ObjectAccessor" default="build">
<target name="clean">
<delete includeemptydirs="true">
<fileset dir="${basedir}/build" includes="**/*" />
</delete>
</target>
<target name="prepare">
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/pdepend"/>
</target>
<target name="phpcs" depends="prepare" description="Run PHP CodeSniffer">
<exec dir="${basedir}" executable="./vendor/bin/phpcs" output="${basedir}/build/logs/checkstyle.xml" failonerror="false">
<arg line="--standard=PSR1 --standard=PSR2 --report=checkstyle --ignore=*/tests/*,*/vendor/*,*/build/* --config-set show_warnings 0 ."/>
</exec>
</target>
<target name="phpmd" depends="prepare" description="Run PHP-MD tool">
<exec dir="${basedir}" executable="./vendor/bin/phpmd" failonerror="false">
<arg line=". xml codesize
--reportfile ${basedir}/build/logs/pmd.xml
--exclude */tests/*,*/vendor/*,*/build/*"/>
</exec>
</target>
<target name="phpcpd" depends="prepare" description="Run PHP-CPD tool">
<exec dir="${basedir}" executable="./vendor/bin/phpcpd" failonerror="false">
<arg line="--log-pmd ${basedir}/build/logs/pmd-cpd.xml --exclude tests --exclude vendor --exclude build ."/>
</exec>
</target>
<target name="pdepend" depends="prepare" description="Run PDepend tool">
<exec dir="${basedir}" executable="./vendor/bin/pdepend" failonerror="false">
<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="--ignore=tests,vendor,build" />
<arg path="${basedir}" />
</exec>
</target>
<target name="phploc" depends="prepare" description="Measure project size using PHPLOC">
<exec executable="./vendor/bin/phploc">
<arg value="--log-csv" />
<arg value="${basedir}/build/logs/phploc.csv" />
<arg path="${basedir}/src" />
</exec>
</target>
<target name="phpunit" depends="prepare" description="Run PHPUnit tests">
<exec dir="${basedir}" executable="./vendor/bin/phpunit" failonerror="true">
</exec>
</target>
<target name="build" depends="clean,prepare,phpcs,phpmd,phpcpd,pdepend,phploc,phpunit"/>
</project>