]>
Commit | Line | Data |
---|---|---|
c4685c84 TL |
1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- | |
3 | ********************************** DO NOT EDIT ********************************** | |
4 | ||
5 | This file will be replaced during upgrades so DO NOT EDIT this file. If you need to | |
6 | adjust the process, reading and understanding this file is the first step. | |
7 | ||
8 | In most cases, the adjustments can be achieved by setting properties or providing one | |
9 | of the "hooks" in the form of a "-before-" or "-after-" target. Whenever possible, look | |
10 | for one of these solutions. | |
11 | ||
12 | Failing that, you can copy whole targets to your build.xml file and it will overrride | |
13 | the target provided here. Doing that can create problems for upgrading to newer | |
14 | versions of Cmd so it is not recommended but it will be easier to manage than editing | |
15 | this file in most cases. | |
16 | --> | |
17 | <project name="x-app-build-impl" default=".help"> | |
18 | <!-- | |
19 | =============================================================== | |
20 | helper targets for ant integrations with IDE's | |
21 | (human readable target names) | |
22 | =============================================================== | |
23 | --> | |
24 | <target name="-before-build-testing"/> | |
25 | <target name="-build-testing" depends="testing,build"/> | |
26 | <target name="-after-build-testing"/> | |
27 | <target name="build-testing" | |
28 | depends="-before-build-testing, | |
29 | -build-testing, | |
30 | -after-build-testing"/> | |
31 | ||
32 | <target name="Build - Testing" | |
33 | description="Create a Testing build of this project" | |
34 | depends="build-testing"/> | |
35 | ||
36 | <target name="-before-build-production"/> | |
37 | <target name="-build-production" depends="production,build"/> | |
38 | <target name="-after-build-production"/> | |
39 | <target name="build-production" | |
40 | depends="-before-build-production, | |
41 | -build-production, | |
42 | -after-build-production"/> | |
43 | ||
44 | <target name="Build - Production" | |
45 | description="Create a Production build of this project" | |
46 | depends="build-production"/> | |
47 | ||
48 | <target name="-before-build-native"/> | |
49 | <target name="-build-native" depends="native,build"/> | |
50 | <target name="-after-build-native"/> | |
51 | <target name="build-native" | |
52 | depends="-before-build-native, | |
53 | -build-native, | |
54 | -after-build-native"/> | |
55 | ||
56 | <target name="Build - Native" | |
57 | description="Create a Native build of this project" | |
58 | depends="build-native"/> | |
59 | ||
60 | <target name="-before-start-local-webserver"/> | |
61 | <target name="-start-local-webserver" depends="init"> | |
62 | <x-launch-terminal> | |
63 | <![CDATA[ | |
64 | ${cmd.dir}/sencha fs web -port=${build.web.port} start -map=${build.web.root} | |
65 | ]]> | |
66 | </x-launch-terminal> | |
67 | </target> | |
68 | <target name="-after-start-local-webserver"/> | |
69 | <target name="start-local-webserver" | |
70 | depends="-before-start-local-webserver, | |
71 | -start-local-webserver, | |
72 | -after-start-local-webserver"/> | |
73 | ||
74 | <target name="WebServer - Start Local" | |
75 | description="Starts a local webserver for this project" | |
76 | depends="start-local-webserver"/> | |
77 | ||
78 | <target name="-before-compass-watch"/> | |
79 | <target name="-compass-watch" depends="init"> | |
80 | <x-launch-terminal> | |
81 | compass watch ${app.sass.dir} | |
82 | </x-launch-terminal> | |
83 | </target> | |
84 | <target name="-after-compass-watch"/> | |
85 | <target name="compass-watch" | |
86 | depends="-before-compass-watch, | |
87 | -compass-watch, | |
88 | -after-compass-watch"/> | |
89 | ||
90 | <target name="Compass - Watch" | |
91 | description="Opens terminal and watches for SASS updates" | |
92 | depends="compass-watch"/> | |
93 | ||
94 | <!-- | |
95 | =============================================================== | |
96 | environment setters | |
97 | =============================================================== | |
98 | --> | |
99 | <target name="production" | |
100 | description="Sets the build environment to production."> | |
101 | <property name="build.environment" value="production"/> | |
102 | </target> | |
103 | ||
104 | <target name="testing" | |
105 | description="Sets the build environment to testing."> | |
106 | <property name="build.environment" value="testing"/> | |
107 | </target> | |
108 | ||
109 | <target name="native" | |
110 | description="Sets the build environment to native."> | |
111 | <property name="build.environment" value="native"/> | |
112 | </target> | |
113 | ||
114 | <target name="package" | |
115 | description="Sets the build environment to package."> | |
116 | <property name="build.environment" value="package"/> | |
117 | </target> | |
118 | ||
119 | <target name="development" | |
120 | description="Sets the build environment to development."> | |
121 | <property name="build.environment" value="development"/> | |
122 | </target> | |
123 | ||
124 | <!-- | |
125 | =============================================================== | |
126 | Find Cmd | |
127 | uses targets from find-cmd-impl.xml to detect the current | |
128 | install of Sencha Cmd | |
129 | =============================================================== | |
130 | --> | |
131 | <import file="${basedir}/.sencha/app/find-cmd-impl.xml"/> | |
132 | <target name="init-cmd" | |
133 | depends="find-cmd-in-path, | |
134 | find-cmd-in-environment, | |
135 | find-cmd-in-shell"> | |
136 | <echo>Using Sencha Cmd from ${cmd.dir} for ${ant.file}</echo> | |
137 | ||
138 | <!-- | |
139 | load the sencha.jar ant task definitions. | |
140 | ||
141 | NOTE: the 'loaderref' attribute stores this task def's class loader | |
142 | on the project by that name, so it will be sharable across sub-projects. | |
143 | This fixes out-of-memory issues, as well as increases performance. | |
144 | ||
145 | To supoprt this, it is recommended that any customizations that use | |
146 | 'ant' or 'antcall' tasks set 'inheritrefs=true' on those tasks, in order | |
147 | to propagate the senchaloader reference to those subprojects. | |
148 | ||
149 | The sencha 'x-ant-call' task, which extends 'antcall' and defaults | |
150 | 'inheritrefs' to true, may be used in place of antcall in | |
151 | build process customizations. | |
152 | --> | |
153 | <taskdef resource="com/sencha/ant/antlib.xml" | |
154 | classpath="${cmd.dir}/sencha.jar" | |
155 | loaderref="senchaloader"/> | |
156 | ||
157 | <!-- | |
158 | Some operations require sencha.jar in the current java classpath, | |
159 | so this will extend the java.lang.Thread#contextClassLoader with the | |
160 | specified java classpath entries | |
161 | --> | |
162 | <x-extend-classpath> | |
163 | <jar path="${cmd.dir}/sencha.jar"/> | |
164 | </x-extend-classpath> | |
165 | </target> | |
166 | ||
167 | <!-- | |
168 | =============================================================== | |
169 | Init | |
170 | uses targets from init-impl.xml to load Sencha Cmd config | |
171 | system properties and ant task definitions | |
172 | =============================================================== | |
173 | --> | |
174 | <import file="${basedir}/.sencha/app/init-impl.xml"/> | |
175 | <target name="init" | |
176 | depends="init-local, | |
177 | init-cmd, | |
178 | -before-init, | |
179 | -init, | |
180 | -after-init, | |
181 | -before-init-defaults, | |
182 | -init-defaults, | |
183 | -after-init-defaults, | |
184 | -init-compiler, | |
185 | -init-native-package"/> | |
186 | ||
187 | <!-- | |
188 | =============================================================== | |
189 | Build | |
190 | this is the starting point for the build process. The 'depends' | |
191 | attribute on the -build target controls the ordering of the | |
192 | different build phases | |
193 | =============================================================== | |
194 | --> | |
195 | <target name="-before-build"/> | |
196 | <target name="-build" | |
197 | depends="refresh, | |
198 | resolve, | |
199 | js, | |
200 | resources, | |
201 | sass, | |
202 | slice, | |
203 | page, | |
204 | native-package"/> | |
205 | <target name="-after-build"/> | |
206 | <target name="build" | |
207 | depends="init,-before-build,-build,-after-build" | |
208 | description="Builds the application"/> | |
209 | ||
210 | <!-- | |
211 | =============================================================== | |
212 | Clean | |
213 | removes all artifacts from the output build directories | |
214 | =============================================================== | |
215 | --> | |
216 | <target name="-before-clean"/> | |
217 | <target name="-clean"> | |
218 | <delete dir="${app.output.base}"/> | |
219 | <delete dir="${build.temp.dir}"/> | |
220 | </target> | |
221 | <target name="-after-clean"/> | |
222 | <target name="clean" | |
223 | depends="init" | |
224 | description="Removes all build output produced by the 'build' target"> | |
225 | <x-ant-call unless="skip.clean"> | |
226 | <target name="-before-clean"/> | |
227 | <target name="-clean"/> | |
228 | <target name="-after-clean"/> | |
229 | </x-ant-call> | |
230 | </target> | |
231 | ||
232 | <!-- | |
233 | =============================================================== | |
234 | Watch | |
235 | uses targets from watch-impl.xml to initiate the application | |
236 | watch process using instrumented state from the compiler | |
237 | =============================================================== | |
238 | --> | |
239 | <import file="${basedir}/.sencha/app/watch-impl.xml"/> | |
240 | <target name="-watch-init"> | |
241 | <property name="app.watch.enabled" value="true"/> | |
242 | </target> | |
243 | <target name="watch" | |
244 | depends="-watch-init,development,init" | |
245 | description="Starts Watch to keep your app ready for dev mode"> | |
246 | <x-ant-call> | |
247 | <target name="-before-watch"/> | |
248 | <target name="-watch"/> | |
249 | <target name="-after-watch"/> | |
250 | </x-ant-call> | |
251 | </target> | |
252 | ||
253 | <!-- | |
254 | =============================================================== | |
255 | JS | |
256 | uses targets from js-impl.xml to produce the output js files | |
257 | containing needed application and framework js classes | |
258 | =============================================================== | |
259 | --> | |
260 | <import file="${basedir}/.sencha/app/js-impl.xml"/> | |
261 | <target name="js" | |
262 | depends="init" | |
263 | description="Builds the output javascript file(s)"> | |
264 | <x-ant-call unless="skip.js"> | |
265 | <target name="-before-js"/> | |
266 | <target name="-js"/> | |
267 | <target name="-after-js"/> | |
268 | </x-ant-call> | |
269 | </target> | |
270 | ||
271 | <!-- | |
272 | =============================================================== | |
273 | Sass | |
274 | uses targets from sass-impl.xml to produce the output css | |
275 | files for the application's styling | |
276 | =============================================================== | |
277 | --> | |
278 | <import file="${basedir}/.sencha/app/sass-impl.xml"/> | |
279 | <target name="sass" | |
280 | depends="init" | |
281 | description="Builds the Sass files using Compass."> | |
282 | <x-ant-call unless="skip.sass"> | |
283 | <target name="-before-sass"/> | |
284 | <target name="-sass"/> | |
285 | <target name="-after-sass"/> | |
286 | </x-ant-call> | |
287 | </target> | |
288 | ||
289 | <!-- | |
290 | =============================================================== | |
291 | Resources | |
292 | uses targets from resources-impl.xml to copy resources from | |
293 | the application and required packages to the output directory | |
294 | =============================================================== | |
295 | --> | |
296 | <import file="${basedir}/.sencha/app/resources-impl.xml"/> | |
297 | <target name="resources" | |
298 | depends="init" | |
299 | description="Copy resources to build folder."> | |
300 | <x-ant-call unless="skip.resources"> | |
301 | <target name="-before-resources"/> | |
302 | ||
303 | <!-- Legacy targets: --> | |
304 | <target name="-before-inherit-resources"/> | |
305 | <target name="-before-copy-resources"/> | |
306 | ||
307 | <target name="-resources"/> | |
308 | ||
309 | <!-- Legacy targets: --> | |
310 | <target name="-after-copy-resources"/> | |
311 | <target name="-after-inherit-resources"/> | |
312 | ||
313 | <target name="-after-resources"/> | |
314 | </x-ant-call> | |
315 | </target> | |
316 | ||
317 | ||
318 | <!-- | |
319 | =============================================================== | |
320 | Slice | |
321 | uses targets from slice-impl.xml to extract theme images from | |
322 | the application for use with older browsers that don't | |
323 | support modern css features | |
324 | =============================================================== | |
325 | --> | |
326 | <import file="${basedir}/.sencha/app/slice-impl.xml"/> | |
327 | <target name="slice" | |
328 | depends="init" | |
329 | description="Slices CSS3 theme to produce non-CSS3 images and sprites."> | |
330 | <x-ant-call unless="skip.slice"> | |
331 | <target name="-before-slice"/> | |
332 | <target name="-slice"/> | |
333 | <target name="-after-slice"/> | |
334 | </x-ant-call> | |
335 | </target> | |
336 | ||
337 | <!-- | |
338 | Theme - this is a legacy support target for extjs 4.1 apps. It redirects | |
339 | to the "slice" ant target | |
340 | --> | |
341 | <target name="theme" | |
342 | depends="init" | |
343 | description="Builds the application's theme(s) images using the slicer (Ext JS 4.1 only)."> | |
344 | <x-ant-call unless="skip.theme"> | |
345 | <target name="-before-theme"/> | |
346 | <target name="slice"/> | |
347 | <target name="-after-theme"/> | |
348 | </x-ant-call> | |
349 | </target> | |
350 | ||
351 | <!-- | |
352 | Refresh Theme - uses targets from refresh-impl.xml to rebuild the current | |
353 | theme | |
354 | --> | |
355 | <target name="refresh-theme" | |
356 | depends="init" | |
357 | description="Rebuilds the currently enabled app theme (Ext JS 4.1 only)."> | |
358 | <x-ant-call unless="skip.theme"> | |
359 | <target name="-before-refresh-theme"/> | |
360 | <target name="-refresh-theme"/> | |
361 | <target name="-after-refresh-theme"/> | |
362 | </x-ant-call> | |
363 | </target> | |
364 | ||
365 | <!-- | |
366 | =============================================================== | |
367 | Refresh | |
368 | uses targets from refresh-impl.xml to generate bootstrapping | |
369 | information for the application | |
370 | =============================================================== | |
371 | --> | |
372 | <import file="${basedir}/.sencha/app/refresh-impl.xml"/> | |
373 | <target name="refresh" | |
374 | depends="init" | |
375 | description="Refreshes the application bootstrap data."> | |
376 | <x-ant-call unless="skip.refresh"> | |
377 | <target name="-before-refresh"/> | |
378 | <target name="-refresh"/> | |
379 | <target name="-after-refresh"/> | |
380 | </x-ant-call> | |
381 | </target> | |
382 | ||
383 | <!-- | |
384 | =============================================================== | |
385 | Page | |
386 | uses targets from page-impl.xml to generate the output markup | |
387 | file and associated microloader / app manifest | |
388 | =============================================================== | |
389 | --> | |
390 | <import file="${basedir}/.sencha/app/page-impl.xml"/> | |
391 | <target name="page" | |
392 | depends="init" | |
393 | description="Builds the application's HTML page."> | |
394 | <x-ant-call unless="skip.page"> | |
395 | <target name="-before-page"/> | |
396 | <target name="-page"/> | |
397 | <target name="-after-page"/> | |
398 | </x-ant-call> | |
399 | </target> | |
400 | ||
401 | <!-- | |
402 | =============================================================== | |
403 | Resolve | |
404 | uses targets from resolve-impl.xml to detect dynamic app | |
405 | dependencies using phantomjs | |
406 | =============================================================== | |
407 | --> | |
408 | <import file="${basedir}/.sencha/app/resolve-impl.xml"/> | |
409 | <target name="resolve" | |
410 | depends="init" | |
411 | description="Resolve application dependencies dynamically."> | |
412 | <x-ant-call unless="skip.resolve"> | |
413 | <target name="-before-resolve"/> | |
414 | <target name="-resolve"/> | |
415 | <target name="-after-resolve"/> | |
416 | </x-ant-call> | |
417 | </target> | |
418 | ||
419 | <!-- | |
420 | =============================================================== | |
421 | Native Package | |
422 | uses targets from packager-impl.xml to run native packager | |
423 | applications to produce stand-alone installable web apps from | |
424 | this built Cmd application | |
425 | =============================================================== | |
426 | --> | |
427 | <import file="${basedir}/.sencha/app/packager-impl.xml"/> | |
428 | <import file="${basedir}/.sencha/app/cordova-impl.xml"/> | |
429 | <import file="${basedir}/.sencha/app/phonegap-impl.xml"/> | |
430 | <target name="native-package" | |
431 | depends="init" | |
432 | description="Builds native packages of the application"> | |
433 | <x-ant-call unless="skip.native-package"> | |
434 | <target name="-before-native-package"/> | |
435 | <target name="-native-package"/> | |
436 | <target name="-after-native-package"/> | |
437 | </x-ant-call> | |
438 | </target> | |
439 | ||
440 | <!-- | |
441 | =============================================================== | |
442 | Help - properties | |
443 | displays all current ant properties | |
444 | =============================================================== | |
445 | --> | |
446 | <target name=".props" depends="init" | |
447 | description="Lists all properties defined for the build"> | |
448 | <echoproperties/> | |
449 | </target> | |
450 | ||
451 | <!-- | |
452 | =============================================================== | |
453 | Help - docs | |
454 | displays the help message | |
455 | =============================================================== | |
456 | --> | |
457 | <target name=".help" depends="init" | |
458 | description="Provides help on the build script"> | |
459 | <x-get-project-targets property="help.message"/> | |
460 | ||
461 | <echo><![CDATA[${help.message} | |
462 | This is the main build script for your application. | |
463 | ||
464 | The following properties can be used to disable certain steps in the build | |
465 | process. | |
466 | ||
467 | * skip.page Do not build the HTML page. | |
468 | * skip.js Do not build the output js code file(s) | |
469 | * skip.resources Do not copy resources to the build directory | |
470 | * skip.sass Do not build the SASS. | |
471 | * skip.slice Do not build the theme image slicer. | |
472 | ||
473 | Most build options are controlled by the app manifest. For details see: | |
474 | ||
475 | ${basedir}/app.json | |
476 | ||
477 | For more specific controls over the build process, see: | |
478 | ||
479 | ${basedir}/.sencha/app/defaults.properties | |
480 | ||
481 | For details about how these options affect your build, see | |
482 | ||
483 | ${basedir}/.sencha/app/build-impl.xml | |
484 | ||
485 | These options can be stored in a local.properties file in this folder or in the | |
486 | local.properties file in the workspace. This file should not be included in | |
487 | source control. | |
488 | ||
489 | Alternatively, these can be supplied on the command line. For example: | |
490 | ||
491 | ant -Dskip.sass=1 build | |
492 | ||
493 | To see all currently defined properties, do this: | |
494 | ||
495 | ant .props | |
496 | ]]></echo> | |
497 | </target> | |
498 | ||
499 | </project> |