There is an Ant property called "build.operations" which you can define that is injected just prior to Cmd saving the set of files it determines are needed by your app. These are the files that will be concatenated into the build/app.js file.
I added this to build.xml since multi-line properties are much cleaner in this file then in a .properties file:
Code:
<target name="-before-init">
<property name="build.operations">
exclude
-all
and
include
-namespace=App
</property>
</target>
This will only keep your app code by using its namespace name (a white-list). In more complex scenarios you might need to exclude only specific things (a black-list). This will exclude only the core and ext packages:
Code:
<target name="-before-init">
<property name="build.operations">
exclude
-tag=package-sencha-core
-tag=package-ext
</property>
</target>
You didn't mention the theme you are using but that will come into play because themes have JavaScript overrides. To exclude the Neptune theme as well (if you plan to also include its all.js file):
Code:
<target name="-before-init">
<property name="build.operations">
exclude
-tag=package-sencha-core
-tag=package-ext
-tag=package-ext-theme-neptune
</property>
</target>
If you do an A/B test on this I would love to hear your results of "cache benefit" using this approach vs "less code to execute" using the stock app build.