1 <project name=
"init-impl">
5 <target name=
"-before-init-local"/>
6 <target name=
"-init-local">
8 ${basedir} is actually the basedir of build.xml, in the app root
9 so this imports ${app.dir}/local.properties, if present
11 <property file=
"${basedir}/local.properties"/>
14 This will traverse upwards in the file system, starting at the
15 app root directory, looking for the workspace. Once found,
16 ${workspace.dir}/local.properties will be imported into this
19 <script language=
"javascript">
21 var f = new java.io.File(project.getProperty(
"basedir"));
22 var sub =
".sencha/workspace/sencha.cfg";
24 for (var p = f; p; p = p.getParentFile()) {
25 var t = new java.io.File(p, sub);
27 // we found the workspace folder!
29 t = new java.io.File(p,
"local.properties");
31 var loader = project.createTask(
"property");
32 loader.setFile(new java.io.File(t.getCanonicalPath()));
43 <target name=
"-after-init-local"/>
44 <target name=
"init-local"
45 depends=
"-before-init-local,-init-local,-after-init-local"/>
47 <target name=
"-before-init"/>
48 <target name=
"-init" unless=
"internal.x-sencha-initialized">
50 Now, apply various project updates, such as ant class loader path
51 updates, as well as loading Sencha Cmd config system properties
52 into ant property space
54 <x-sencha-init prefix=
""/>
57 default the build environment to production if it is unset by this point
59 <property name=
"build.environment" value=
"production"/>
60 <property name=
"CR" value=
" "/>
63 <!-- Load user-defined properties for environment then general: -->
64 <file path=
"${app.config.dir}/${build.environment}.properties" required=
"false"/>
65 <file path=
"${app.config.dir}/build.properties" required=
"false"/>
66 <!-- Pick up the defaults by framework/environment followed by general: -->
67 <file path=
"${app.config.dir}/${framework.name}.properties" required=
"true"/>
68 <file path=
"${app.config.dir}/${build.environment}.defaults.properties" required=
"true"/>
69 <file path=
"${app.config.dir}/defaults.properties" required=
"true"/>
73 calculate the appropriate build.compression value
75 <condition property=
"build.compression" value=
"-yui">
76 <x-is-true value=
"${build.compression.yui}"/>
79 <condition property=
"build.compression" value=
"-closure">
80 <x-is-true value=
"${build.compression.closure}"/>
83 <condition property=
"build.compression" value=
"-uglify">
84 <x-is-true value=
"${build.compression.uglify}"/>
87 <property name=
"build.compression" value=
""/>
89 <x-verify-app-cmd-ver/>
92 this id string is used to share a common compiler instance
93 for all x-compile calls in this project
95 <property name=
"compiler.ref.id" value=
"app-compiler"/>
98 this property is set indicating we've reached the end of the
99 core init phase. it's presence will indicate that we've already
100 executed this target, and will bypass firing the init code
101 repeatedly in sub projects (antcall, x-ant-call)
102 See the above 'unless' attribute on the -init target
104 <property name=
"internal.x-sencha-initialized" value=
"true"/>
106 <target name=
"-after-init"/>
108 <target name=
"-before-init-defaults"/>
109 <target name=
"-init-defaults">
111 This property can be modified to change general build options
112 such as excluding files from the set. The format expects newlines
113 for each argument, for example:
115 <property name="build.operations"/>
120 <property name=
"build.operations" value=
""/>
123 This property can be modified to change concatenation
126 -strip-comments: comment suppression
127 -remove-text-references: transform string literal class references to objects
128 -beautify: unpack the source
130 <property name="build.concat.options"/>
132 -remove-text-references
136 <property name=
"build.concat.options" value=
""/>
139 This property can be modified to change page compilation options
141 -scripts: inject the given script path into the generated markup ahead of the all classes file
143 <property name="build.page.options"/>
144 -scripts=framework.js
147 <property name=
"build.page.options" value=
""/>
149 <target name=
"-after-init-defaults"/>
152 Initializes the compiler instances, reading in the app.json and package.json
153 definitions, as well as scanning and parsing all js files found on the
154 various classpath entries for the framework, workspace, packages, and app
156 <target name=
"-init-compiler" depends=
"-init">
157 <condition property=
"internal.app.css.rel" value=
"${app.out.css.rel}">
158 <x-is-true value=
"${enable.ext42.themes}"/>
160 <property name=
"internal.app.css.rel" value=
""/>
162 <x-compile refid=
"${compiler.ref.id}"
168 -tempDir=${build.compile.temp.dir}
169 -keepTempDir=${build.compile.temp.dir.keep}
170 -options=${build.options}
172 -frameworkFile=${build.framework.name}
173 -jsBundleFile=${build.classes.name}
174 -cssBundleFile=${internal.app.css.rel}
175 -tempDir=${build.app.temp.dir}
176 -tag=${build.tag.name}
183 -out=${build.out.package.versions}
186 -path=${build.out.package.versions}
190 -source=@${build.tag.name}
196 -source=Ext.util.Observable
197 -requires=${build.out.package.versions}
202 -tag=${build.tag.name}
205 ${build.tag.name}-overrides