|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
2 | 2 |
|
3 | 3 | <project name="joomla-platform" default="build" basedir=".">
|
4 |
| - <property name="source" value="libraries"/> |
5 |
| - <property name="joomlasource" value="libraries/joomla,libraries/platform.php,libraries/loader.php,libraries/import.php"/> |
| 4 | + <property name="source" value="libraries" /> |
| 5 | + <property name="joomlasource" value="libraries/joomla,libraries/platform.php,libraries/loader.php,libraries/import.php" /> |
6 | 6 |
|
7 |
| - <target name="clean" |
8 |
| - description="Clean up and create artifact directories"> |
9 |
| - <delete dir="${basedir}/build/api"/> |
10 |
| - <delete dir="${basedir}/build/code-browser"/> |
11 |
| - <delete dir="${basedir}/build/coverage"/> |
12 |
| - <delete dir="${basedir}/build/logs"/> |
13 |
| - <delete dir="${basedir}/build/pdepend"/> |
| 7 | + <target name="clean" description="Clean up and create artifact directories"> |
| 8 | + <delete dir="${basedir}/build/api" /> |
| 9 | + <delete dir="${basedir}/build/code-browser" /> |
| 10 | + <delete dir="${basedir}/build/coverage" /> |
| 11 | + <delete dir="${basedir}/build/logs" /> |
| 12 | + <delete dir="${basedir}/build/pdepend" /> |
14 | 13 |
|
15 |
| - <mkdir dir="${basedir}/build/api"/> |
16 |
| - <mkdir dir="${basedir}/build/code-browser"/> |
17 |
| - <mkdir dir="${basedir}/build/coverage"/> |
18 |
| - <mkdir dir="${basedir}/build/logs"/> |
19 |
| - <mkdir dir="${basedir}/build/pdepend"/> |
20 |
| - </target> |
| 14 | + <mkdir dir="${basedir}/build/api" /> |
| 15 | + <mkdir dir="${basedir}/build/code-browser" /> |
| 16 | + <mkdir dir="${basedir}/build/coverage" /> |
| 17 | + <mkdir dir="${basedir}/build/logs" /> |
| 18 | + <mkdir dir="${basedir}/build/pdepend" /> |
| 19 | + </target> |
21 | 20 |
|
22 |
| - <target name="phpunit" |
23 |
| - description="Run unit tests using PHPUnit and generates junit.xml and clover.xml"> |
24 |
| - <exec executable="phpunit"/> |
25 |
| - </target> |
| 21 | + <target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml"> |
| 22 | + <exec executable="phpunit" /> |
| 23 | + </target> |
26 | 24 |
|
27 |
| - <target name="parallelTasks" |
28 |
| - description="Run the pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc tasks in parallel using a maximum of 2 threads."> |
29 |
| - <parallel threadCount="2"> |
30 |
| - <sequential> |
31 |
| - <antcall target="pdepend"/> |
32 |
| - <antcall target="phpmd"/> |
33 |
| - </sequential> |
34 |
| - <antcall target="phpcpd"/> |
35 |
| - <antcall target="phpcs"/> |
36 |
| - <antcall target="phpdoc"/> |
37 |
| - <antcall target="phploc"/> |
38 |
| - </parallel> |
39 |
| - </target> |
| 25 | + <target name="phpunit-legacy" description="Run legacy tests using PHPUnit and generates junit.legacy.xml and clover.legacy.xml"> |
| 26 | + <exec executable="phpunit"> |
| 27 | + <arg value="-c legacy.xml.dist" /> |
| 28 | + </exec> |
| 29 | + </target> |
40 | 30 |
|
41 |
| - <target name="pdepend" |
42 |
| - description="Generate jdepend.xml and software metrics charts using PHP_Depend"> |
43 |
| - <exec executable="pdepend"> |
44 |
| - <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" /> |
45 |
| - <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" /> |
46 |
| - <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" /> |
47 |
| - <arg path="${source}" /> |
48 |
| - </exec> |
49 |
| - </target> |
| 31 | + <target name="parallelTasks" description="Run the pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc tasks in parallel using a maximum of 2 threads."> |
| 32 | + <parallel threadCount="2"> |
| 33 | + <sequential> |
| 34 | + <antcall target="pdepend" /> |
| 35 | + <antcall target="phpmd" /> |
| 36 | + </sequential> |
| 37 | + <antcall target="phpcpd" /> |
| 38 | + <antcall target="phpcs" /> |
| 39 | + <antcall target="phpdoc" /> |
| 40 | + <antcall target="phploc" /> |
| 41 | + </parallel> |
| 42 | + </target> |
50 | 43 |
|
51 |
| - <target name="phpmd" |
52 |
| - description="Generate pmd.xml using PHPMD"> |
53 |
| - <exec executable="phpmd"> |
54 |
| - <arg path="${joomlasource}" /> |
55 |
| - <arg value="xml" /> |
56 |
| - <arg value="${basedir}/build/phpmd.xml" /> |
57 |
| - <arg value="--reportfile" /> |
58 |
| - <arg value="${basedir}/build/logs/pmd.xml" /> |
59 |
| - </exec> |
60 |
| - </target> |
| 44 | + <target name="pdepend" description="Generate jdepend.xml and software metrics charts using PHP_Depend"> |
| 45 | + <exec executable="pdepend"> |
| 46 | + <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" /> |
| 47 | + <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" /> |
| 48 | + <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" /> |
| 49 | + <arg path="${source}" /> |
| 50 | + </exec> |
| 51 | + </target> |
61 | 52 |
|
62 |
| - <target name="phpcpd" |
63 |
| - description="Generate pmd-cpd.xml using PHPCPD"> |
64 |
| - <exec executable="phpcpd"> |
65 |
| - <arg value="--log-pmd" /> |
66 |
| - <arg value="${basedir}/build/logs/pmd-cpd.xml" /> |
67 |
| - <arg path="${source}/joomla" /> |
68 |
| - </exec> |
69 |
| - </target> |
| 53 | + <target name="phpmd" description="Generate pmd.xml using PHPMD"> |
| 54 | + <exec executable="phpmd"> |
| 55 | + <arg path="${joomlasource}" /> |
| 56 | + <arg value="xml" /> |
| 57 | + <arg value="${basedir}/build/phpmd.xml" /> |
| 58 | + <arg value="--reportfile" /> |
| 59 | + <arg value="${basedir}/build/logs/pmd.xml" /> |
| 60 | + </exec> |
| 61 | + </target> |
70 | 62 |
|
71 |
| - <target name="phploc" |
72 |
| - description="Generate phploc.csv"> |
73 |
| - <exec executable="phploc"> |
74 |
| - <arg value="--log-csv" /> |
75 |
| - <arg value="${basedir}/build/logs/phploc.csv" /> |
76 |
| - <arg path="${source}/joomla" /> |
77 |
| - </exec> |
78 |
| - </target> |
| 63 | + <target name="phpcpd" description="Generate pmd-cpd.xml using PHPCPD"> |
| 64 | + <exec executable="phpcpd"> |
| 65 | + <arg value="--log-pmd" /> |
| 66 | + <arg value="${basedir}/build/logs/pmd-cpd.xml" /> |
| 67 | + <arg path="${source}/joomla" /> |
| 68 | + </exec> |
| 69 | + </target> |
79 | 70 |
|
80 |
| - <target name="phpcs" |
81 |
| - description="Generate checkstyle.xml using PHP_CodeSniffer"> |
82 |
| - <exec executable="phpcs"> |
83 |
| - <arg value="--report=checkstyle" /> |
84 |
| - <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" /> |
85 |
| - <arg value="--standard=${basedir}/build/phpcs/Joomla" /> |
86 |
| - <arg value="--ignore=${source}/phpmailer,${source}/phputf8,${source}/simplepie/,${source}/config.example.php" /> |
87 |
| - <arg path="${source}" /> |
88 |
| - </exec> |
89 |
| - </target> |
| 71 | + <target name="phploc" description="Generate phploc.csv"> |
| 72 | + <exec executable="phploc"> |
| 73 | + <arg value="--log-csv" /> |
| 74 | + <arg value="${basedir}/build/logs/phploc.csv" /> |
| 75 | + <arg path="${source}/joomla" /> |
| 76 | + </exec> |
| 77 | + </target> |
90 | 78 |
|
91 |
| - <target name="phpdoc" |
92 |
| - description="Generate API documentation using PHPDocumentor"> |
93 |
| - <exec executable="phpdox"> |
94 |
| - <arg value="-c" /> |
95 |
| - <arg path="${source}" /> |
96 |
| - <arg value="-d" /> |
97 |
| - <arg path="${basedir}/build/api" /> |
98 |
| - <arg value="-x" /> |
99 |
| - <arg path="${basedir}/build/docs" /> |
100 |
| - <arg value="-g" /> |
101 |
| - <arg value="html" /> |
102 |
| - </exec> |
103 |
| - </target> |
| 79 | + <target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer"> |
| 80 | + <exec executable="phpcs"> |
| 81 | + <arg value="--report=checkstyle" /> |
| 82 | + <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" /> |
| 83 | + <arg value="--standard=${basedir}/build/phpcs/Joomla" /> |
| 84 | + <arg value="--ignore=${source}/phpmailer,${source}/phputf8,${source}/simplepie/,${source}/config.example.php" /> |
| 85 | + <arg path="${source}" /> |
| 86 | + </exec> |
| 87 | + </target> |
104 | 88 |
|
105 |
| - <target name="phpcb" |
106 |
| - description="Aggregate tool output with PHP_CodeBrowser"> |
107 |
| - <exec executable="phpcb"> |
108 |
| - <arg value="--log" /> |
109 |
| - <arg path="${basedir}/build/logs" /> |
110 |
| - <arg value="--source" /> |
111 |
| - <arg path="${source}" /> |
112 |
| - <arg value="--output" /> |
113 |
| - <arg path="${basedir}/build/code-browser" /> |
114 |
| - </exec> |
115 |
| - </target> |
| 89 | + <target name="phpdoc" description="Generate API documentation using PHPDocumentor"> |
| 90 | + <exec executable="phpdox"> |
| 91 | + <arg value="-c" /> |
| 92 | + <arg path="${source}" /> |
| 93 | + <arg value="-d" /> |
| 94 | + <arg path="${basedir}/build/api" /> |
| 95 | + <arg value="-x" /> |
| 96 | + <arg path="${basedir}/build/docs" /> |
| 97 | + <arg value="-g" /> |
| 98 | + <arg value="html" /> |
| 99 | + </exec> |
| 100 | + </target> |
116 | 101 |
|
117 |
| - <target name="build" depends="clean,parallelTasks,phpunit,phpcb"/> |
| 102 | + <target name="phpcb" description="Aggregate tool output with PHP_CodeBrowser"> |
| 103 | + <exec executable="phpcb"> |
| 104 | + <arg value="--log" /> |
| 105 | + <arg path="${basedir}/build/logs" /> |
| 106 | + <arg value="--source" /> |
| 107 | + <arg path="${source}" /> |
| 108 | + <arg value="--output" /> |
| 109 | + <arg path="${basedir}/build/code-browser" /> |
| 110 | + </exec> |
| 111 | + </target> |
| 112 | + |
| 113 | + <target name="build" depends="clean,phpunit,phpunit-legacy,parallelTasks,phpcb" /> |
118 | 114 | </project>
|
0 commit comments