23 <project name="helium-builder" default="build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib"> |
23 <project name="helium-builder" default="build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib"> |
24 <property environment="env" /> |
24 <property environment="env" /> |
25 <taskdef name="fmpp" classname="fmpp.tools.AntTask" /> |
25 <taskdef name="fmpp" classname="fmpp.tools.AntTask" /> |
26 <import file="delivery.ant.xml" /> |
26 <import file="delivery.ant.xml" /> |
27 |
27 |
28 <!-- Ensuring that only Ant 1.7.0 is in use. --> |
28 <!-- Ensuring that only Ant 1.7.0 is in use. |
29 <ac:if> |
29 <ac:if> |
30 <not> |
30 <not> |
31 <contains string="${ant.version}" substring="1.7.0" /> |
31 <contains string="${ant.version}" substring="1.7.0" /> |
32 </not> |
32 </not> |
33 <then> |
33 <then> |
34 <fail message="Your current ant version is ${ant.version}, you must use 1.7.0" /> |
34 <fail message="Your current ant version is ${ant.version}, you must use 1.7.0" /> |
35 </then> |
35 </then> |
36 </ac:if> |
36 </ac:if> --> |
37 |
37 |
38 <condition property="platform" value="win32" else="unix"> |
38 <condition property="platform" value="win32" else="unix"> |
39 <os family="windows"/> |
39 <os family="windows"/> |
40 </condition> |
40 </condition> |
|
41 |
41 <dirname property="builder.dir" file="${ant.file.helium-builder}" /> |
42 <dirname property="builder.dir" file="${ant.file.helium-builder}" /> |
42 <property name="source.root.dir" location="${builder.dir}/.." /> |
43 <property name="source.root.dir" location="${builder.dir}/.." /> |
43 <property name="build.temp.dir" location="${source.root.dir}/build" /> |
44 <property name="build.temp.dir" location="${source.root.dir}/build" /> |
44 <property name="components.temp.dir" location="${build.temp.dir}/components" /> |
45 <property name="components.temp.dir" location="${build.temp.dir}/components" /> |
45 <property name="component" value="*" /> |
46 <property name="component" value="*" /> |
61 <exclude name="licences/**" /> |
62 <exclude name="licences/**" /> |
62 <exclude name="tests/**" /> |
63 <exclude name="tests/**" /> |
63 <exclude name="build/**" /> |
64 <exclude name="build/**" /> |
64 </fileset> |
65 </fileset> |
65 |
66 |
|
67 |
66 <target name="cleanup" description="Cleanup (delete the temp build directory)"> |
68 <target name="cleanup" description="Cleanup (delete the temp build directory)"> |
67 <delete dir="${build.temp.dir}" failonerror="false"/> |
69 <delete dir="${build.temp.dir}" failonerror="false"/> |
68 </target> |
70 </target> |
|
71 |
69 |
72 |
70 <target name="get-build-list"> |
73 <target name="get-build-list"> |
71 <ivy:buildlist reference="ivy.buildlist.path"> |
74 <ivy:buildlist reference="ivy.buildlist.path"> |
72 <fileset refid="ant.build.files"/> |
75 <fileset refid="ant.build.files"/> |
73 </ivy:buildlist> |
76 </ivy:buildlist> |
74 </target> |
77 </target> |
75 |
78 |
|
79 |
76 <target name="report" depends="get-build-list" description="Create Ivy report for each component"> |
80 <target name="report" depends="get-build-list" description="Create Ivy report for each component"> |
77 <subant target="report" buildpathref="ivy.buildlist.path"> |
81 <subant target="report" buildpathref="ivy.buildlist.path"> |
78 <property name="builder.dir" location="${builder.dir}" /> |
82 <property name="builder.dir" location="${builder.dir}" /> |
79 </subant> |
83 </subant> |
80 </target> |
84 </target> |
81 |
85 |
|
86 |
82 <target name="compile" depends="get-build-list"> |
87 <target name="compile" depends="get-build-list"> |
83 <subant target="compile" buildpathref="ivy.buildlist.path"> |
88 <subant target="compile" buildpathref="ivy.buildlist.path"> |
84 <property name="builder.dir" location="${builder.dir}" /> |
89 <property name="builder.dir" location="${builder.dir}" /> |
85 <property name="source.root.dir" value="${source.root.dir}"/> |
90 <property name="source.root.dir" value="${source.root.dir}"/> |
86 </subant> |
91 </subant> |
87 </target> |
92 </target> |
88 |
93 |
|
94 |
89 <target name="build" depends="get-build-list" description="Build each component"> |
95 <target name="build" depends="get-build-list" description="Build each component"> |
90 <subant target="package" buildpathref="ivy.buildlist.path"> |
96 <subant target="package" buildpathref="ivy.buildlist.path"> |
91 <property name="builder.dir" location="${builder.dir}" /> |
97 <property name="builder.dir" location="${builder.dir}" /> |
92 <property name="source.root.dir" value="${source.root.dir}"/> |
98 <property name="source.root.dir" value="${source.root.dir}"/> |
93 <property name="platform" value="${platform}"/> |
99 <property name="platform" value="${platform}"/> |
94 </subant> |
100 </subant> |
95 </target> |
101 </target> |
96 |
102 |
|
103 |
97 <target name="clean" depends="get-build-list" description="Run clean on each component"> |
104 <target name="clean" depends="get-build-list" description="Run clean on each component"> |
98 <subant target="clean" buildpathref="ivy.buildlist.path"> |
105 <subant target="clean" buildpathref="ivy.buildlist.path"> |
99 <property name="builder.dir" location="${builder.dir}" /> |
106 <property name="builder.dir" location="${builder.dir}" /> |
100 <property name="source.root.dir" value="${source.root.dir}"/> |
107 <property name="source.root.dir" value="${source.root.dir}"/> |
101 </subant> |
108 </subant> |
102 </target> |
109 </target> |
103 |
110 |
|
111 |
104 <target name="test" depends="get-build-list,build" description="Run test on each component"> |
112 <target name="test" depends="get-build-list,build" description="Run test on each component"> |
105 <ac:for param="file" keepgoing="true"> |
113 <ac:for param="file" keepgoing="true"> |
106 <path refid="ivy.buildlist.path" /> |
114 <path refid="ivy.buildlist.path" /> |
107 <sequential> |
115 <sequential> |
108 <echo>Testing: @{file}</echo> |
116 <echo>Testing: @{file}</echo> |
109 <ant antfile="@{file}" dir="@{file}/.." target="test" inheritAll="false"> |
117 <ant antfile="@{file}" dir="@{file}/.." target="test" inheritAll="false"> |
110 <property name="builder.dir" location="${builder.dir}" /> |
118 <property name="builder.dir" location="${builder.dir}" /> |
|
119 <property name="source.root.dir" location="${source.root.dir}" /> |
111 </ant> |
120 </ant> |
112 </sequential> |
121 </sequential> |
113 </ac:for> |
122 </ac:for> |
114 </target> |
123 </target> |
115 <!-- TODO: remove after CI tools are cleaned up --> |
124 <!-- TODO: remove after CI tools are cleaned up --> |
116 <target name="unittest" depends="test"/> |
125 <target name="unittest" depends="test"/> |
117 |
126 |
118 <target name="junit" depends="get-build-list" description="Run junit on each component"> |
127 |
|
128 <target name="junit" depends="get-build-list" description="Run JUnit tests on each component"> |
119 <subant target="junit" buildpathref="ivy.buildlist.path"> |
129 <subant target="junit" buildpathref="ivy.buildlist.path"> |
120 <property name="builder.dir" location="${builder.dir}" /> |
130 <property name="builder.dir" location="${builder.dir}" /> |
121 </subant> |
131 <property name="source.root.dir" location="${source.root.dir}" /> |
122 </target> |
132 </subant> |
123 |
133 </target> |
124 <target name="antunit" depends="get-build-list" description="Run antunit on each component"> |
134 |
|
135 |
|
136 <target name="antunit" depends="get-build-list" description="Run AntUnit tests on each component"> |
125 <subant target="antunit" buildpathref="ivy.buildlist.path"> |
137 <subant target="antunit" buildpathref="ivy.buildlist.path"> |
126 <property name="builder.dir" location="${builder.dir}" /> |
138 <property name="builder.dir" location="${builder.dir}" /> |
127 </subant> |
139 <property name="source.root.dir" location="${source.root.dir}" /> |
128 </target> |
140 </subant> |
|
141 </target> |
|
142 |
129 |
143 |
130 <target name="quality" depends="get-build-list" description="Run quality checks on each component"> |
144 <target name="quality" depends="get-build-list" description="Run quality checks on each component"> |
131 <ac:for param="file" keepgoing="true"> |
145 <ac:for param="file" keepgoing="true"> |
132 <path refid="ivy.buildlist.path" /> |
146 <path refid="ivy.buildlist.path" /> |
133 <sequential> |
147 <sequential> |