forked from feathersui/feathersui-starling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
432 lines (382 loc) · 15.9 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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
<?xml version="1.0" encoding="utf-8"?>
<project name="feathers" default="swc" basedir=".">
<!-- build.local.properties and sdk.local.proprties are optional files that
can be used to override the default properties. -->
<property file="./sdk.local.properties"/>
<property file="./sdk.properties"/>
<property file="./build.local.properties"/>
<property file="./build.properties"/>
<taskdef resource="flexUnitTasks.tasks" classpath="${flexunit}"/>
<target name="swc" depends="-feathers,-cleanup" description="builds feathers.swc only"/>
<target name="docs" depends="-prepare,-docs,-cleanup" description="builds help files and API reference only"/>
<target name="help" depends="-prepare,-help,-cleanup" description="builds help files only"/>
<!-- builds help files to deploy to website -->
<target name="web-help" depends="-web,-prepare,-help,-cleanup"/>
<target name="beta-web-help" depends="-beta-web,-prepare,-help,-cleanup"/>
<target name="api" depends="-api,-cleanup" description="builds API reference only"/>
<target name="test" depends="-test,-cleanup" description="runs unit tests"/>
<target name="full" depends="-feathers,-test,-docs,-themes,-includes,-cleanup" description="builds everything">
<!-- move feathers.swc to its final location for distribution.
basically, we didn't want the extra swc directory for a quick build. -->
<copy overwrite="true" todir="${swc.output}">
<fileset dir="${output.path}">
<include name="feathers.swc"/>
</fileset>
</copy>
<delete file="${output.path}/feathers.swc"/>
</target>
<target name="package" depends="full" description="builds everything and creates a zip file for distribution">
<zip destfile="${output.path}/feathers.zip">
<zipfileset dir="${output.path}"/>
</zip>
<delete includeemptydirs="true">
<fileset dir="${output.path}" excludes="feathers.zip"/>
</delete>
</target>
<target name="-beta-web">
<property name="web" value="true"/>
<property name="help.url.search" value="feathersui.com/beta/help/"/>
</target>
<target name="-web">
<property name="web" value="true"/>
<property name="help.url.search" value="feathersui.com/help/"/>
</target>
<target name="-prepare">
<property name="web" value=""/>
<property name="help.url.search" value=""/>
<delete dir="${output.path}"/>
</target>
<target name="-cleanup">
<delete dir="${dependency.output}"/>
</target>
<target name="-starling" depends="-prepare">
<echo message="Building starling.swc"/>
<java jar="${compc}" dir="${starling.root}" fork="true" failonerror="true">
<arg value="-load-config=${airsdk.config}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-source-path+=."/>
<arg value="-include-sources+=."/>
<arg value="-output=${dependency.output}/starling.swc"/>
</java>
</target>
<target name="-feathers" depends="-starling">
<echo message="Building feathers.swc"/>
<java jar="${compc}" dir="${basedir}" fork="true" failonerror="true">
<arg value="-load-config=${airsdk.config}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-source-path+=${source.root}"/>
<arg value="-include-sources+=${source.root}"/>
<arg value="-external-library-path+=${dependency.output}"/>
<arg value="-output=${output.path}/feathers.swc"/>
</java>
</target>
<target name="-docs" depends="-api,-help"/>
<target name="-api" depends="-starling">
<echo message="Generating API Reference"/>
<java jar="${asdoc}" dir="${basedir}" fork="true" failonerror="true">
<arg value="+flexlib=${airsdk.framework}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-source-path+=${source.root}"/>
<arg value="-library-path+=${dependency.output}"/>
<arg value="-doc-sources+=${source.root}"/>
<!-- these two arguments are needed after switching to the AIR SDK
with ASC 2.0 to stop weird errors -->
<arg value="-theme="/>
<arg value="-compiler.fonts.local-fonts-snapshot="/>
<arg value="-templates-path"/>
<arg value="${api.root}/templates"/>
<arg value="-main-title=Feathers ${feathers.version} API Reference"/>
<arg value="-window-title=Feathers User Interface Controls for Starling Framework API Reference"/>
<arg value="-footer=${footer.text}"/>
<arg value="-package-description-file=./package-descriptions.xml"/>
<arg value="-output=${api.output}"/>
</java>
</target>
<target name="-help">
<echo message="Generating Help Files"/>
<mkdir dir="${help.output}"/>
<property name="help.title.main" value="Feathers ${feathers.version} Help"/>
<apply executable="pandoc" dir="${help.root}" dest="${help.output}" failonerror="true">
<srcfile/>
<arg value="-f"/>
<arg value="markdown_github+yaml_metadata_block+markdown_in_html_blocks"/>
<arg value="-t"/>
<arg value="html5"/>
<arg value="-s"/>
<arg value="--template=template"/>
<arg value="--css=css/feathers-help.css"/>
<arg value="--variable=title-suffix:${help.title.main}"/>
<arg value="--variable=lang:en"/>
<arg value="--variable=web:${web}"/>
<arg value="--variable=search-url:${help.url.search}"/>
<arg value="-o"/>
<targetfile/>
<fileset dir="${help.root}/markdown" includes="*.md" />
<mapper type="glob" from="*.md" to="*.html"/>
</apply>
<mkdir dir="${help.output}/cookbook"/>
<property name="help.title.cookbook" value="Feathers Cookbook"/>
<apply executable="pandoc" dir="${help.root}" dest="${help.output}/cookbook" failonerror="true">
<srcfile/>
<arg value="-f"/>
<arg value="markdown_github+yaml_metadata_block+markdown_in_html_blocks"/>
<arg value="-t"/>
<arg value="html5"/>
<arg value="-s"/>
<arg value="--template=template"/>
<arg value="--css=../css/feathers-help.css"/>
<arg value="--variable=title-suffix:${help.title.cookbook}"/>
<arg value="--variable=lang:en"/>
<arg value="--variable=web:${web}"/>
<arg value="--variable=breadcrumb:${help.title.main}"/>
<arg value="--variable=search-url:${help.url.search}"/>
<arg value="-o"/>
<targetfile/>
<fileset dir="${help.root}/markdown/cookbook" includes="*.md" />
<mapper type="glob" from="*.md" to="*.html"/>
</apply>
<mkdir dir="${help.output}/faq"/>
<property name="help.title.faq" value="Feathers FAQ"/>
<apply executable="${pandoc}" dir="${help.root}" dest="${help.output}/faq" failonerror="true">
<srcfile/>
<arg value="-f"/>
<arg value="markdown_github+yaml_metadata_block+markdown_in_html_blocks"/>
<arg value="-t"/>
<arg value="html5"/>
<arg value="-s"/>
<arg value="--template=template"/>
<arg value="--css=../css/feathers-help.css"/>
<arg value="--variable=title-suffix:${help.title.faq}"/>
<arg value="--variable=lang:en"/>
<arg value="--variable=web:${web}"/>
<arg value="--variable=breadcrumb:${help.title.main}"/>
<arg value="--variable=search-url:${help.url.search}"/>
<arg value="-o"/>
<targetfile/>
<fileset dir="${help.root}/markdown/faq" includes="*.md" />
<mapper type="glob" from="*.md" to="*.html"/>
</apply>
<copy overwrite="true" todir="${help.output}/images">
<fileset dir="${help.root}/markdown/images">
<include name="*.png"/>
<include name="*.gif"/>
<include name="*.jpg"/>
</fileset>
</copy>
<mkdir dir="${help.output}/css"/>
<copy overwrite="true" todir="${help.output}/css">
<fileset dir="${help.root}/css">
<include name="*.css"/>
</fileset>
</copy>
</target>
<target name="-themes" depends="-feathers">
<echo message="Building AeonDesktopTheme.swc"/>
<java jar="${compc}" dir="${themes.root}/AeonDesktopTheme" fork="true" failonerror="true">
<arg value="-load-config=${airsdk.config}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-source-path+=${themes.root}/AeonDesktopTheme/source"/>
<arg value="-include-sources+=${themes.root}/AeonDesktopTheme/source"/>
<arg value="-external-library-path+=${dependency.output}"/>
<arg value="-external-library-path+=${output.path}/feathers.swc"/>
<arg value="-output=${themes.output}/AeonDesktopTheme/swc/AeonDesktopTheme.swc"/>
</java>
<echo message="Building MetalWorksDesktopTheme.swc"/>
<java jar="${compc}" dir="${themes.root}/MetalWorksDesktopTheme" fork="true" failonerror="true">
<arg value="-load-config=${airsdk.config}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-source-path+=${themes.root}/MetalWorksDesktopTheme/source"/>
<arg value="-include-sources+=${themes.root}/MetalWorksDesktopTheme/source"/>
<arg value="-external-library-path+=${dependency.output}"/>
<arg value="-external-library-path+=${output.path}/feathers.swc"/>
<arg value="-output=${themes.output}/MetalWorksDesktopTheme/swc/MetalWorksDesktopTheme.swc"/>
</java>
<echo message="Building MetalWorksMobileTheme.swc"/>
<java jar="${compc}" dir="${themes.root}/MetalWorksMobileTheme" fork="true" failonerror="true">
<arg value="-load-config=${airsdk.config}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-source-path+=${themes.root}/MetalWorksMobileTheme/source"/>
<arg value="-include-sources+=${themes.root}/MetalWorksMobileTheme/source"/>
<arg value="-external-library-path+=${dependency.output}"/>
<arg value="-external-library-path+=${output.path}/feathers.swc"/>
<arg value="-output=${themes.output}/MetalWorksMobileTheme/swc/MetalWorksMobileTheme.swc"/>
</java>
<echo message="Building MinimalDesktopTheme.swc"/>
<java jar="${compc}" dir="${themes.root}/MinimalDesktopTheme" fork="true" failonerror="true">
<arg value="-load-config=${airsdk.config}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-source-path+=${themes.root}/MinimalDesktopTheme/source"/>
<arg value="-include-sources+=${themes.root}/MinimalDesktopTheme/source"/>
<arg value="-external-library-path+=${dependency.output}"/>
<arg value="-external-library-path+=${output.path}/feathers.swc"/>
<arg value="-output=${themes.output}/MinimalDesktopTheme/swc/MinimalDesktopTheme.swc"/>
</java>
<echo message="Building MinimalMobileTheme.swc"/>
<java jar="${compc}" dir="${themes.root}/MinimalMobileTheme" fork="true" failonerror="true">
<arg value="-load-config=${airsdk.config}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-source-path+=${themes.root}/MinimalMobileTheme/source"/>
<arg value="-include-sources+=${themes.root}/MinimalMobileTheme/source"/>
<arg value="-external-library-path+=${dependency.output}"/>
<arg value="-external-library-path+=${output.path}/feathers.swc"/>
<arg value="-output=${themes.output}/MinimalMobileTheme/swc/MinimalMobileTheme.swc"/>
</java>
</target>
<target name="-includes">
<echo message="Copying Feathers source code"/>
<copy overwrite="true" todir="${source.output}">
<fileset dir="${source.root}"/>
</copy>
<echo message="Copying informational documents"/>
<copy overwrite="true" todir="${output.path}">
<fileset dir="${basedir}">
<include name="README.md"/>
<include name="LICENSE.md"/>
<include name="RELEASENOTES.md"/>
</fileset>
</copy>
<echo message="Copying theme source code and assets"/>
<copy overwrite="true" todir="${themes.output}/AeonDesktopTheme">
<fileset dir="${themes.root}/AeonDesktopTheme">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
</fileset>
</copy>
<copy overwrite="true" todir="${themes.output}/MetalWorksDesktopTheme">
<fileset dir="${themes.root}/MetalWorksDesktopTheme">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
</fileset>
</copy>
<copy overwrite="true" todir="${themes.output}/MetalWorksMobileTheme">
<fileset dir="${themes.root}/MetalWorksMobileTheme">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
</fileset>
</copy>
<copy overwrite="true" todir="${themes.output}/MinimalDesktopTheme">
<fileset dir="${themes.root}/MinimalDesktopTheme">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
</fileset>
</copy>
<copy overwrite="true" todir="${themes.output}/MinimalMobileTheme">
<fileset dir="${themes.root}/MinimalMobileTheme">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
</fileset>
</copy>
<echo message="Copying examples"/>
<copy overwrite="true" todir="${examples.output}/ComponentsExplorer">
<fileset dir="${examples.root}/ComponentsExplorer">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
<exclude name="source/ComponentsExplorerWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/DrawersExplorer">
<fileset dir="${examples.root}/DrawersExplorer">
<include name="README.md"/>
<include name="source/**"/>
<exclude name="source/DrawersExplorerWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/DisplayObjectExplorer">
<fileset dir="${examples.root}/DisplayObjectExplorer">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
<exclude name="source/DisplayObjectExplorerWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/DragAndDrop">
<fileset dir="${examples.root}/DragAndDrop">
<include name="README.md"/>
<include name="source/**"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/Gallery">
<fileset dir="${examples.root}/Gallery">
<include name="README.md"/>
<include name="source/**"/>
<exclude name="source/GalleryWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/HelloWorld">
<fileset dir="${examples.root}/HelloWorld">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
<exclude name="source/HelloWorldWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/LayoutExplorer">
<fileset dir="${examples.root}/LayoutExplorer">
<include name="README.md"/>
<include name="source/**"/>
<exclude name="source/LayoutExplorerWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/TileList">
<fileset dir="${examples.root}/TileList">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
<exclude name="source/TileListWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/Todos">
<fileset dir="${examples.root}/Todos">
<include name="README.md"/>
<include name="source/**"/>
<exclude name="source/TodosWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/TrainTimes">
<fileset dir="${examples.root}/TrainTimes">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
<exclude name="source/TrainTimesWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/TransitionsExplorer">
<fileset dir="${examples.root}/TransitionsExplorer">
<include name="README.md"/>
<include name="source/**"/>
<include name="assets/**"/>
<exclude name="source/TransitionsExplorerWeb.as"/>
</fileset>
</copy>
<copy overwrite="true" todir="${examples.output}/YouTubeFeeds">
<fileset dir="${examples.root}/YouTubeFeeds">
<include name="README.md"/>
<include name="source/**"/>
<exclude name="source/YouTubeFeedsWeb.as"/>
</fileset>
</copy>
</target>
<target name="-test" depends="-feathers">
<java jar="${mxmlc}" dir="${test.root}/source" fork="true" failonerror="true">
<arg value="-load-config=${airsdk.config}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-library-path+=${dependency.output}"/>
<arg value="-library-path+=${flexunit.root}"/>
<arg value="-library-path+=${output.path}"/>
<arg value="-output=${dependency.output}/TestFeathers.swf"/>
<arg value="TestFeathers.as"/>
</java>
<flexunit
player="flash"
swf="${dependency.output}/TestFeathers.swf"
haltonfailure="true"
verbose="true"
toDir="${dependency.output}"/>
</target>
</project>