forked from flexunit/flexunit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
277 lines (250 loc) · 11.3 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<?xml version="1.0" encoding="UTF-8"?>
<!--
Since we're eating our own dogfood here, our build process is a bit non-standard. Assuming
the following call should be made to run this script:
ant -v clean package
the build order is as such:
clean->anttasks->core->cilistener->test->listeners->package
Reporting is something each project implements which we then have hooked into Hudson
to contribute to our CI process.
-->
<project name="FlexUnit4" basedir="." default="package">
<property environment="env" />
<!-- Version info -->
<property file="${basedir}/version.properties" />
<!-- Configuration -->
<property name="finalName" value="flexunit-${build.version}-${build.number}-${build.sdk}" />
<!-- Project locations -->
<property name="anttasks.loc" location="${basedir}/FlexUnit4AntTasks" />
<property name="core.loc" location="${basedir}/FlexUnit4" />
<property name="fluint.loc" location="${basedir}/FlexUnit4FluintExtensions" />
<property name="cilistener.loc" location="${basedir}/FlexUnit4CIListener" />
<property name="tests.loc" location="${basedir}/FlexUnit4Test" />
<property name="uilistener.loc" location="${basedir}/FlexUnit4UIListener" />
<property name="aircilistener.loc" location="${basedir}/FlexUnit4AirCIListener" />
<property name="flexcoverlistener.loc" location="${basedir}/FlexUnit4FlexCoverListener" />
<property name="turnkey.loc" location="${basedir}/FlexUnit4TurnKey" />
<property name="sampleCI.loc" location="${basedir}/FlexUnit4SampleCIProject" />
<!-- xml namespace which is used to deploy the artifacts with maven -->
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpath="lib/maven-ant-tasks-2.1.3.jar"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpath="lib/ant-contrib-0.6.jar"/>
<!-- Cleans up all projects -->
<target name="clean">
<!-- Ask each project to clean up -->
<ant dir="${anttasks.loc}" target="clean" inheritall="false" />
<ant dir="${core.loc}" target="clean" inheritall="false" />
<ant dir="${fluint.loc}" target="clean" inheritall="false" />
<ant dir="${cilistener.loc}" target="clean" inheritall="false" />
<ant dir="${tests.loc}" target="clean" inheritall="false" />
<ant dir="${uilistener.loc}" target="clean" inheritall="false" />
<ant dir="${aircilistener.loc}" target="clean" inheritall="false" />
<ant dir="${flexcoverlistener.loc}" target="clean" inheritall="false" />
<delete failonerror="false">
<fileset dir="${basedir}">
<include name="*.zip" />
</fileset>
</delete>
</target>
<!-- Builds the FlexUnit4AntTasks project -->
<target name="anttasks">
<ant dir="${anttasks.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Builds the core FlexUnit4 project -->
<target name="core">
<ant dir="${core.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and builds the FlexUnit4 Fluint Extensions -->
<target name="fluint" depends="core">
<ant dir="${fluint.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and builds the FlexUnit4CIListener project -->
<target name="cilistener" depends="core">
<ant dir="${cilistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and builds the FlexCover Listener project -->
<target name="flexcoverlistener" depends="core,cilistener">
<ant dir="${flexcoverlistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and builds the FlexUnit4Test project -->
<target name="test" depends="anttasks,core,fluint,cilistener,flexcoverlistener" unless="build.skipTests">
<ant dir="${tests.loc}" target="test" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<target name="listeners" depends="uilistener,aircilistener" />
<!-- Prepares and builds the FlexUnit4UIRunner project -->
<target name="uilistener" depends="core,fluint,cilistener">
<ant dir="${uilistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and builds the Air CI Listener project -->
<target name="aircilistener" depends="core,fluint,cilistener">
<ant dir="${aircilistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and assembles the final zip artifact with all of the FlexUnit4 components and docs -->
<target name="package" depends="test,listeners">
<zip destfile="${basedir}/${finalName}.zip">
<!-- Docs -->
<zipfileset dir="${anttasks.loc}/target/docs" prefix="flexunit/docs/anttasks" />
<zipfileset dir="${core.loc}/target/docs" prefix="flexunit/docs/flexunit" />
<zipfileset dir="${fluint.loc}/target/docs" prefix="flexunit/docs/flexUnit4FluintExtensions" />
<zipfileset dir="${cilistener.loc}/target/docs" prefix="flexunit/docs/cilistener" />
<zipfileset dir="${uilistener.loc}/target/docs" prefix="flexunit/docs/uilistener" />
<zipfileset dir="${aircilistener.loc}/target/docs" prefix="flexunit/docs/aircilistener" />
<zipfileset dir="${flexcoverlistener.loc}/target/docs" prefix="flexunit/docs/flexcoverlistener" />
<!-- Artifacts -->
<zipfileset dir="${anttasks.loc}/target" prefix="flexunit">
<include name="*.jar" />
</zipfileset>
<zipfileset dir="${core.loc}/target" prefix="flexunit">
<include name="flexunit*.swc" />
</zipfileset>
<zipfileset dir="${fluint.loc}/target" prefix="flexunit">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${cilistener.loc}/target" prefix="flexunit">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${flexcoverlistener.loc}/target" prefix="flexunit">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${uilistener.loc}/target" prefix="flexunit">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${aircilistener.loc}/target" prefix="flexunit">
<include name="*.swc" />
</zipfileset>
<!-- Turnkey -->
<zipfileset dir="${turnkey.loc}" prefix="flexunit/turnkey">
<exclude name="**/export/**/*" />
</zipfileset>
<zipfileset dir="${core.loc}/target" prefix="flexunit/turnkey/libs">
<include name="flexunit*flex*.swc" />
</zipfileset>
<zipfileset dir="${core.loc}/libs" prefix="flexunit/turnkey/libs">
<include name="*.swc" />
<exclude name="fluint-1_2.swc" />
</zipfileset>
<zipfileset dir="${fluint.loc}/target" prefix="flexunit/turnkey/libs">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${uilistener.loc}/target" prefix="flexunit/turnkey/libs">
<include name="*.swc" />
</zipfileset>
<!-- Sample CI project -->
<zipfileset dir="${sampleCI.loc}" prefix="flexunit/sampleCIProject">
<exclude name="**/libs/**/*" />
</zipfileset>
<zipfileset dir="${anttasks.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="*.jar" />
</zipfileset>
<zipfileset dir="${core.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="flexunit*.swc" />
</zipfileset>
<zipfileset dir="${fluint.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="fluint*.swc" />
</zipfileset>
<zipfileset dir="${fluint.loc}/libs" prefix="flexunit/sampleCIProject/libs">
<include name="fluint*.swc" />
</zipfileset>
<zipfileset dir="${cilistener.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${uilistener.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${aircilistener.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="*.swc" />
</zipfileset>
</zip>
</target>
<target name="sonatype" description="Target used to generate bundles for deployment to Sonatype.">
<ant dir="${anttasks.loc}" target="deploy" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
<ant dir="${core.loc}" target="deploy" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
<ant dir="${fluint.loc}" target="deploy" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
<ant dir="${cilistener.loc}" target="deploy" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
<ant dir="${flexcoverlistener.loc}" target="deploy" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
<ant dir="${uilistener.loc}" target="deploy" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
<ant dir="${aircilistener.loc}" target="deploy" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
<zip destfile="${basedir}/sonatype-${finalName}.zip">
<zipfileset dir="${anttasks.loc}/target/sonatype">
<include name="sonatype-*.zip" />
</zipfileset>
<zipfileset dir="${core.loc}/target/sonatype">
<include name="sonatype-*.zip" />
</zipfileset>
<zipfileset dir="${cilistener.loc}/target/sonatype">
<include name="sonatype-*.zip" />
</zipfileset>
<zipfileset dir="${flexcoverlistener.loc}/target/sonatype">
<include name="sonatype-*.zip" />
</zipfileset>
<zipfileset dir="${uilistener.loc}/target/sonatype">
<include name="sonatype-*.zip" />
</zipfileset>
<zipfileset dir="${aircilistener.loc}/target/sonatype">
<include name="sonatype-*.zip" />
</zipfileset>
</zip>
</target>
</project>