1 <?xml version=
"1.0" encoding=
"utf-8"?>
3 ********************************** DO NOT EDIT **********************************
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.
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.
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.
17 <project name=
"x-app-build-impl" default=
".help">
19 ===============================================================
20 helper targets for ant integrations with IDE's
21 (human readable target names)
22 ===============================================================
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,
30 -after-build-testing"/>
32 <target name=
"Build - Testing"
33 description=
"Create a Testing build of this project"
34 depends=
"build-testing"/>
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,
42 -after-build-production"/>
44 <target name=
"Build - Production"
45 description=
"Create a Production build of this project"
46 depends=
"build-production"/>
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,
54 -after-build-native"/>
56 <target name=
"Build - Native"
57 description=
"Create a Native build of this project"
58 depends=
"build-native"/>
60 <target name=
"-before-start-local-webserver"/>
61 <target name=
"-start-local-webserver" depends=
"init">
64 ${cmd.dir}/sencha fs web -port=${build.web.port} start -map=${build.web.root}
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"/>
74 <target name=
"WebServer - Start Local"
75 description=
"Starts a local webserver for this project"
76 depends=
"start-local-webserver"/>
78 <target name=
"-before-compass-watch"/>
79 <target name=
"-compass-watch" depends=
"init">
81 compass watch ${app.sass.dir}
84 <target name=
"-after-compass-watch"/>
85 <target name=
"compass-watch"
86 depends=
"-before-compass-watch,
88 -after-compass-watch"/>
90 <target name=
"Compass - Watch"
91 description=
"Opens terminal and watches for SASS updates"
92 depends=
"compass-watch"/>
95 ===============================================================
97 ===============================================================
99 <target name=
"production"
100 description=
"Sets the build environment to production.">
101 <property name=
"build.environment" value=
"production"/>
104 <target name=
"testing"
105 description=
"Sets the build environment to testing.">
106 <property name=
"build.environment" value=
"testing"/>
109 <target name=
"native"
110 description=
"Sets the build environment to native.">
111 <property name=
"build.environment" value=
"native"/>
114 <target name=
"package"
115 description=
"Sets the build environment to package.">
116 <property name=
"build.environment" value=
"package"/>
119 <target name=
"development"
120 description=
"Sets the build environment to development.">
121 <property name=
"build.environment" value=
"development"/>
125 ===============================================================
127 uses targets from find-cmd-impl.xml to detect the current
128 install of Sencha Cmd
129 ===============================================================
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,
136 <echo>Using Sencha Cmd from ${cmd.dir} for ${ant.file}
</echo>
139 load the sencha.jar ant task definitions.
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.
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.
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.
153 <taskdef resource=
"com/sencha/ant/antlib.xml"
154 classpath=
"${cmd.dir}/sencha.jar"
155 loaderref=
"senchaloader"/>
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
163 <jar path=
"${cmd.dir}/sencha.jar"/>
164 </x-extend-classpath>
168 ===============================================================
170 uses targets from init-impl.xml to load Sencha Cmd config
171 system properties and ant task definitions
172 ===============================================================
174 <import file=
"${basedir}/.sencha/app/init-impl.xml"/>
175 <import file=
"${basedir}/.sencha/app/resolve-impl.xml"/>
182 -before-init-defaults,
184 -after-init-defaults,
186 -init-native-package,
190 ===============================================================
192 this is the starting point for the build process. The 'depends'
193 attribute on the -build target controls the ordering of the
194 different build phases
195 ===============================================================
197 <target name=
"-before-build"/>
198 <target name=
"-build"
207 <target name=
"-after-build"/>
209 depends=
"init,-before-build,-build,-after-build"
210 description=
"Builds the application"/>
213 ===============================================================
215 removes all artifacts from the output build directories
216 ===============================================================
218 <target name=
"-before-clean"/>
219 <target name=
"-clean">
220 <delete dir=
"${app.output.base}"/>
221 <delete dir=
"${build.temp.dir}"/>
223 <target name=
"-after-clean"/>
226 description=
"Removes all build output produced by the 'build' target">
227 <x-ant-call unless=
"skip.clean">
228 <target name=
"-before-clean"/>
229 <target name=
"-clean"/>
230 <target name=
"-after-clean"/>
235 ===============================================================
237 uses targets from watch-impl.xml to initiate the application
238 watch process using instrumented state from the compiler
239 ===============================================================
241 <import file=
"${basedir}/.sencha/app/watch-impl.xml"/>
242 <target name=
"-watch-init">
243 <property name=
"app.watch.enabled" value=
"true"/>
246 depends=
"-watch-init,development,init"
247 description=
"Starts Watch to keep your app ready for dev mode">
249 <param name=
"build.id" value=
"${build.id}"/>
250 <param name=
"build.name" value=
"${build.name}"/>
251 <target name=
"-before-watch"/>
252 <target name=
"-watch"/>
253 <target name=
"-after-watch"/>
258 ===============================================================
260 uses targets from js-impl.xml to produce the output js files
261 containing needed application and framework js classes
262 ===============================================================
264 <import file=
"${basedir}/.sencha/app/js-impl.xml"/>
267 description=
"Builds the output javascript file(s)">
268 <x-ant-call unless=
"skip.js">
269 <target name=
"-before-js"/>
271 <target name=
"-after-js"/>
276 ===============================================================
278 uses targets from sass-impl.xml to produce the output css
279 files for the application's styling
280 ===============================================================
282 <import file=
"${basedir}/.sencha/app/sass-impl.xml"/>
285 description=
"Builds the Sass files using Compass.">
286 <x-ant-call unless=
"skip.sass">
287 <target name=
"-before-sass"/>
288 <target name=
"-sass"/>
289 <target name=
"-after-sass"/>
290 <target name=
"refresh"/>
295 ===============================================================
297 uses targets from resources-impl.xml to copy resources from
298 the application and required packages to the output directory
299 ===============================================================
301 <import file=
"${basedir}/.sencha/app/resources-impl.xml"/>
302 <target name=
"resources"
304 description=
"Copy resources to build folder.">
305 <x-ant-call unless=
"skip.resources">
306 <target name=
"-before-resources"/>
308 <!-- Legacy targets: -->
309 <target name=
"-before-inherit-resources"/>
310 <target name=
"-before-copy-resources"/>
312 <target name=
"-resources"/>
314 <!-- Legacy targets: -->
315 <target name=
"-after-copy-resources"/>
316 <target name=
"-after-inherit-resources"/>
318 <target name=
"-after-resources"/>
324 ===============================================================
326 uses targets from slice-impl.xml to extract theme images from
327 the application for use with older browsers that don't
328 support modern css features
329 ===============================================================
331 <import file=
"${basedir}/.sencha/app/slice-impl.xml"/>
334 description=
"Slices CSS3 theme to produce non-CSS3 images and sprites.">
335 <x-ant-call unless=
"skip.slice">
336 <target name=
"-before-slice"/>
337 <target name=
"-slice"/>
338 <target name=
"-after-slice"/>
343 Theme - this is a legacy support target for extjs 4.1 apps. It redirects
344 to the "slice" ant target
348 description=
"Builds the application's theme(s) images using the slicer (Ext JS 4.1 only).">
349 <x-ant-call unless=
"skip.theme">
350 <target name=
"-before-theme"/>
351 <target name=
"slice"/>
352 <target name=
"-after-theme"/>
357 Refresh Theme - uses targets from refresh-impl.xml to rebuild the current
360 <target name=
"refresh-theme"
362 description=
"Rebuilds the currently enabled app theme (Ext JS 4.1 only).">
363 <x-ant-call unless=
"skip.theme">
364 <target name=
"-before-refresh-theme"/>
365 <target name=
"-refresh-theme"/>
366 <target name=
"-after-refresh-theme"/>
371 ===============================================================
373 uses targets from refresh-impl.xml to generate bootstrapping
374 information for the application
375 ===============================================================
377 <import file=
"${basedir}/.sencha/app/refresh-impl.xml"/>
378 <target name=
"refresh"
380 description=
"Refreshes the application bootstrap data.">
381 <x-ant-call unless=
"skip.refresh">
382 <target name=
"-before-refresh"/>
383 <target name=
"-refresh"/>
384 <target name=
"-after-refresh"/>
389 ===============================================================
391 uses targets from page-impl.xml to generate the output markup
392 file and associated microloader / app manifest
393 ===============================================================
395 <import file=
"${basedir}/.sencha/app/page-impl.xml"/>
398 description=
"Builds the application's HTML page.">
399 <x-ant-call unless=
"skip.page">
400 <target name=
"-before-page"/>
401 <target name=
"-page"/>
402 <target name=
"-after-page"/>
407 ===============================================================
409 uses targets from resolve-impl.xml to detect dynamic app
410 dependencies using phantomjs
411 ===============================================================
413 <target name=
"resolve"
415 description=
"Resolve application dependencies dynamically.">
416 <x-ant-call unless=
"skip.resolve">
417 <target name=
"-before-resolve"/>
418 <target name=
"-resolve"/>
419 <target name=
"-after-resolve"/>
424 ===============================================================
426 uses targets from packager-impl.xml to run native packager
427 applications to produce stand-alone installable web apps from
428 this built Cmd application
429 ===============================================================
431 <import file=
"${basedir}/.sencha/app/packager-impl.xml"/>
432 <import file=
"${basedir}/.sencha/app/cordova-impl.xml"/>
433 <import file=
"${basedir}/.sencha/app/phonegap-impl.xml"/>
434 <target name=
"native-package"
436 description=
"Builds native packages of the application">
437 <x-ant-call unless=
"skip.native-package">
438 <target name=
"-before-native-package"/>
439 <target name=
"-native-package"/>
440 <target name=
"-after-native-package"/>
445 <target name=
"-before-publish"/>
446 <target name=
"-after-publish"/>
447 <target name=
"-publish">
448 <property name=
"app.manager.file" value=
"${app.output.base}"/>
454 -id=${app.manager.id}
456 -host=${app.manager.host}
457 -secret=${app.manager.secret}
458 -apiKey=${app.manager.apiKey}
459 -file=${app.manager.file}
463 <target name=
"publish"
464 depends=
"init,-before-publish,-publish,-after-publish"
465 description=
"Publish app to Sencha Web Application Manager"/>
469 ===============================================================
471 displays all current ant properties
472 ===============================================================
474 <target name=
".props" depends=
"init"
475 description=
"Lists all properties defined for the build">
480 ===============================================================
482 displays the help message
483 ===============================================================
485 <target name=
".help" depends=
"init"
486 description=
"Provides help on the build script">
487 <x-get-project-targets property=
"help.message"/>
489 <echo><![CDATA[${help.message}
490 This is the main build script for your application.
492 The following properties can be used to disable certain steps in the build
495 * skip.page Do not build the HTML page.
496 * skip.js Do not build the output js code file(s)
497 * skip.resources Do not copy resources to the build directory
498 * skip.sass Do not build the SASS.
499 * skip.slice Do not build the theme image slicer.
501 Most build options are controlled by the app manifest. For details see:
505 For more specific controls over the build process, see:
507 ${basedir}/.sencha/app/defaults.properties
509 For details about how these options affect your build, see
511 ${basedir}/.sencha/app/build-impl.xml
513 These options can be stored in a local.properties file in this folder or in the
514 local.properties file in the workspace. This file should not be included in
517 Alternatively, these can be supplied on the command line. For example:
519 ant -Dskip.sass=
1 build
521 To see all currently defined properties, do this: