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=
"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"/>
181 -before-init-defaults,
183 -after-init-defaults,
185 -init-native-package"/>
188 ===============================================================
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 ===============================================================
195 <target name=
"-before-build"/>
196 <target name=
"-build"
205 <target name=
"-after-build"/>
207 depends=
"init,-before-build,-build,-after-build"
208 description=
"Builds the application"/>
211 ===============================================================
213 removes all artifacts from the output build directories
214 ===============================================================
216 <target name=
"-before-clean"/>
217 <target name=
"-clean">
218 <delete dir=
"${app.output.base}"/>
219 <delete dir=
"${build.temp.dir}"/>
221 <target name=
"-after-clean"/>
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"/>
233 ===============================================================
235 uses targets from watch-impl.xml to initiate the application
236 watch process using instrumented state from the compiler
237 ===============================================================
239 <import file=
"${basedir}/.sencha/app/watch-impl.xml"/>
241 depends=
"development,init"
242 description=
"Starts Watch to keep your app ready for dev mode">
244 <target name=
"-before-watch"/>
245 <target name=
"-watch"/>
246 <target name=
"-after-watch"/>
251 ===============================================================
253 uses targets from js-impl.xml to produce the output js files
254 containing needed application and framework js classes
255 ===============================================================
257 <import file=
"${basedir}/.sencha/app/js-impl.xml"/>
260 description=
"Builds the output javascript file(s)">
261 <x-ant-call unless=
"skip.js">
262 <target name=
"-before-js"/>
264 <target name=
"-after-js"/>
269 ===============================================================
271 uses targets from sass-impl.xml to produce the output css
272 files for the application's styling
273 ===============================================================
275 <import file=
"${basedir}/.sencha/app/sass-impl.xml"/>
278 description=
"Builds the Sass files using Compass.">
279 <x-ant-call unless=
"skip.sass">
280 <target name=
"-before-sass"/>
281 <target name=
"-sass"/>
282 <target name=
"-after-sass"/>
287 ===============================================================
289 uses targets from resources-impl.xml to copy resources from
290 the application and required packages to the output directory
291 ===============================================================
293 <import file=
"${basedir}/.sencha/app/resources-impl.xml"/>
294 <target name=
"resources"
296 description=
"Copy resources to build folder.">
297 <x-ant-call unless=
"skip.resources">
298 <target name=
"-before-resources"/>
300 <!-- Legacy targets: -->
301 <target name=
"-before-inherit-resources"/>
302 <target name=
"-before-copy-resources"/>
304 <target name=
"-resources"/>
306 <!-- Legacy targets: -->
307 <target name=
"-after-copy-resources"/>
308 <target name=
"-after-inherit-resources"/>
310 <target name=
"-after-resources"/>
316 ===============================================================
318 uses targets from slice-impl.xml to extract theme images from
319 the application for use with older browsers that don't
320 support modern css features
321 ===============================================================
323 <import file=
"${basedir}/.sencha/app/slice-impl.xml"/>
326 description=
"Slices CSS3 theme to produce non-CSS3 images and sprites.">
327 <x-ant-call unless=
"skip.slice">
328 <target name=
"-before-slice"/>
329 <target name=
"-slice"/>
330 <target name=
"-after-slice"/>
335 Theme - this is a legacy support target for extjs 4.1 apps. It redirects
336 to the "slice" ant target
340 description=
"Builds the application's theme(s) images using the slicer (Ext JS 4.1 only).">
341 <x-ant-call unless=
"skip.theme">
342 <target name=
"-before-theme"/>
343 <target name=
"slice"/>
344 <target name=
"-after-theme"/>
349 Refresh Theme - uses targets from refresh-impl.xml to rebuild the current
352 <target name=
"refresh-theme"
354 description=
"Rebuilds the currently enabled app theme (Ext JS 4.1 only).">
355 <x-ant-call unless=
"skip.theme">
356 <target name=
"-before-refresh-theme"/>
357 <target name=
"-refresh-theme"/>
358 <target name=
"-after-refresh-theme"/>
363 ===============================================================
365 uses targets from refresh-impl.xml to generate bootstrapping
366 information for the application
367 ===============================================================
369 <import file=
"${basedir}/.sencha/app/refresh-impl.xml"/>
370 <target name=
"refresh"
372 description=
"Refreshes the application bootstrap data.">
373 <x-ant-call unless=
"skip.refresh">
374 <target name=
"-before-refresh"/>
375 <target name=
"-refresh"/>
376 <target name=
"-after-refresh"/>
381 ===============================================================
383 uses targets from page-impl.xml to generate the output markup
384 file and associated microloader / app manifest
385 ===============================================================
387 <import file=
"${basedir}/.sencha/app/page-impl.xml"/>
390 description=
"Builds the application's HTML page.">
391 <x-ant-call unless=
"skip.page">
392 <target name=
"-before-page"/>
393 <target name=
"-page"/>
394 <target name=
"-after-page"/>
399 ===============================================================
401 uses targets from resolve-impl.xml to detect dynamic app
402 dependencies using phantomjs
403 ===============================================================
405 <import file=
"${basedir}/.sencha/app/resolve-impl.xml"/>
406 <target name=
"resolve"
408 description=
"Resolve application dependencies dynamically.">
409 <x-ant-call unless=
"skip.resolve">
410 <target name=
"-before-resolve"/>
411 <target name=
"-resolve"/>
412 <target name=
"-after-resolve"/>
417 ===============================================================
419 uses targets from packager-impl.xml to run native packager
420 applications to produce stand-alone installable web apps from
421 this built Cmd application
422 ===============================================================
424 <import file=
"${basedir}/.sencha/app/packager-impl.xml"/>
425 <import file=
"${basedir}/.sencha/app/cordova-impl.xml"/>
426 <import file=
"${basedir}/.sencha/app/phonegap-impl.xml"/>
427 <target name=
"native-package"
429 description=
"Builds native packages of the application">
430 <x-ant-call unless=
"skip.native-package">
431 <target name=
"-before-native-package"/>
432 <target name=
"-native-package"/>
433 <target name=
"-after-native-package"/>
438 ===============================================================
440 displays all current ant properties
441 ===============================================================
443 <target name=
".props" depends=
"init"
444 description=
"Lists all properties defined for the build">
449 ===============================================================
451 displays the help message
452 ===============================================================
454 <target name=
".help" depends=
"init"
455 description=
"Provides help on the build script">
456 <x-get-project-targets property=
"help.message"/>
458 <echo><![CDATA[${help.message}
459 This is the main build script for your application.
461 The following properties can be used to disable certain steps in the build
464 * skip.page Do not build the HTML page.
465 * skip.js Do not build the output js code file(s)
466 * skip.resources Do not copy resources to the build directory
467 * skip.sass Do not build the SASS.
468 * skip.slice Do not build the theme image slicer.
470 Most build options are controlled by the app manifest. For details see:
474 For more specific controls over the build process, see:
476 ${basedir}/.sencha/app/defaults.properties
478 For details about how these options affect your build, see
480 ${basedir}/.sencha/app/build-impl.xml
482 These options can be stored in a local.properties file in this folder or in the
483 local.properties file in the workspace. This file should not be included in
486 Alternatively, these can be supplied on the command line. For example:
488 ant -Dskip.sass=
1 build
490 To see all currently defined properties, do this: