forked from feathersui/feathersui-starling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
276 lines (239 loc) · 9.88 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
<?xml version="1.0" encoding="utf-8"?>
<project name="feathers" default="quick" 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"/>
<target name="quick" depends="-feathers,-cleanup" description="builds feathers.swc only"/>
<target name="docs" depends="-docs,-cleanup" description="builds API reference only"/>
<target name="full" depends="-feathers,-docs,-themes,-includes,-cleanup" description="build 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="build everything and package a zip">
<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="-prepare">
<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="mxml" depends="-starling">
<echo message="Building feathers-mxml.swc"/>
<java jar="${flex.compc}" dir="${basedir}" fork="true" failonerror="true">
<arg value="+flexlib=${flexframework.root}"/>
<arg value="-swf-version=${swf.version}"/>
<arg value="-namespace+=${mxml.namespace},mxml-manifest.xml"/>
<arg value="-source-path+=${source.root}"/>
<arg value="-include-namespaces+=${mxml.namespace}"/>
<arg value="-include-sources+=${source.root}"/>
<arg value="-external-library-path+=${dependency.output}"/>
<arg value="-external-library-path+=${flexframework.lib}"/>
<arg value="-output=${output.path}/feathers-mxml.swc"/>
</java>
</target>
<target name="-docs" 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="-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=${docs.output}"/>
</java>
</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 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 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}/MetalWorksMobileTheme">
<fileset dir="${themes.root}/MetalWorksMobileTheme">
<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}/YouTubeFeeds">
<fileset dir="${examples.root}/YouTubeFeeds">
<include name="README.md"/>
<include name="source/**"/>
<exclude name="source/YouTubeFeedsWeb.as"/>
</fileset>
</copy>
</target>
</project>