Skip to content

Commit 781a37e

Browse files
author
Sandy Pleyte
committed
- added ant build file
- Remove unused code
1 parent 06b60bf commit 781a37e

26 files changed

+103
-4094
lines changed

build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source=${basedir}

build.xml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<project name="DbPatch" default="build" basedir=".">
2+
<property file="build.properties" />
3+
4+
<target name="clean">
5+
<!-- Clean up -->
6+
<delete dir="${basedir}/build" />
7+
8+
<!-- Create build directories -->
9+
<mkdir dir="${basedir}/build/api" />
10+
<mkdir dir="${basedir}/build/code-browser" />
11+
<mkdir dir="${basedir}/build/coverage" />
12+
<mkdir dir="${basedir}/build/logs" />
13+
<mkdir dir="${basedir}/build/pdepend" />
14+
</target>
15+
16+
<!-- Run unit tests and generate junit.xml and clover.xml -->
17+
<target name="phpunit">
18+
<exec executable="phpunit" failonerror="true" />
19+
</target>
20+
21+
<!-- Run the pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc tasks
22+
in parallel using a maximum of 2 threads. -->
23+
<target name="parallelTasks">
24+
<parallel threadCount="2">
25+
<antcall target="pdepend" />
26+
<antcall target="phpmd" />
27+
<antcall target="phpcpd" />
28+
<antcall target="docblox" />
29+
<antcall target="phploc" />
30+
<!-- <antcall target="phpcs"/> -->
31+
</parallel>
32+
</target>
33+
34+
<!-- Generate jdepend.xml and software metrics charts -->
35+
<target name="pdepend">
36+
<exec executable="pdepend">
37+
<arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml
38+
--jdepend-chart=${basedir}/build/pdepend/dependencies.svg
39+
--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg
40+
${source}" />
41+
</exec>
42+
</target>
43+
<!-- Generate pmd.xml -->
44+
<target name="phpmd">
45+
<exec executable="phpmd">
46+
<arg line="${source}
47+
xml
48+
codesize,design,naming,unusedcode
49+
--reportfile ${basedir}/build/logs/pmd.xml" />
50+
</exec>
51+
</target>
52+
53+
<!-- Generate pmd-cpd.xml -->
54+
<target name="phpcpd">
55+
<exec executable="phpcpd">
56+
<arg line="--log-pmd ${basedir}/build/logs/pmd-cpd.xml
57+
${source}" />
58+
</exec>
59+
</target>
60+
61+
<!-- Generate phploc.csv -->
62+
<target name="phploc">
63+
<exec executable="phploc">
64+
<arg line="--log-csv ${basedir}/build/logs/phploc.csv
65+
${source}" />
66+
</exec>
67+
</target>
68+
69+
<!-- Generate checkstyle.xml -->
70+
<target name="phpcs">
71+
<exec executable="phpcs">
72+
<arg line="--report=checkstyle
73+
--report-file=${basedir}/build/logs/checkstyle.xml
74+
--standard=PEAR
75+
${source}" />
76+
</exec>
77+
</target>
78+
79+
<!-- Generate API documentation with DocBlox -->
80+
<target name="docblox">
81+
<exec executable="docblox">
82+
<arg line="parse
83+
-d ${source}
84+
-t ${basedir}/build/api" />
85+
</exec>
86+
<exec executable="docblox">
87+
<arg line="transform
88+
-s ${basedir}/build/api/structure.xml
89+
-t ${basedir}/build/api" />
90+
</exec>
91+
</target>
92+
93+
<target name="phpcb">
94+
<exec executable="phpcb">
95+
<arg line="--log ${basedir}/build/logs
96+
--output ${basedir}/build/code-browser" />
97+
</exec>
98+
</target>
99+
100+
<!--<target name="build" depends="clean,parallelTasks,phpunit,phpcb" />-->
101+
<target name="build" depends="clean,parallelTasks" />
102+
</project>

0 commit comments

Comments
 (0)