Updated my build.xml file via helpful user on stackoverflow. It works now, but getting different errors. That may be a setup thing I am going to investigate further separately.
Code:
Ext.application({
.....
uses: [
/*ant-generated-content-start*/ /*ant-generated-content-end*/
],
.....
}
build.xml
Code:
<target name="-before-build">
<echo message="Collecting all views in application class property ... "/>
<fileset id="app_views" dir="${app.dir}/app/view" casesensitive="yes">
<include name="**/*.js"/>
</fileset>
<pathconvert pathsep="," property="app_view_names" refid="app_views" targetos="unix">
<chainedmapper>
<globmapper from="${app.dir}/app/*" to="${ant.project.name}/*" casesensitive="no" handledirsep="yes"/>
<chainedmapper>
<regexpmapper from="^(.*)\.js$$" to='"\1"'/>
<filtermapper>
<replacestring from="/" to="."/>
<replacestring from="\" to="."/>
</filtermapper>
</chainedmapper>
</chainedmapper>
</pathconvert>
<echo message="Collected views: ${app_view_names}"/>
<echo message="Injecting into app.js ..."/>
<replaceregexp file="${app.dir}/app/app.js"
match="/\*ant-generated-content-start\*/(.*)/\*ant-generated-content-end\*/"
replace="/*ant-generated-content-start*/ ${app_view_names} /*ant-generated-content-end*/"
byline="true"
/>
</target>
<target name="-after-build">
<echo message="Reverting to original app.js ..."/>
<replaceregexp file="${app.dir}/app/app.js"
match="/\*ant-generated-content-start\*/(.*)/\*ant-generated-content-end\*/"
replace="/*ant-generated-content-start*/ /*ant-generated-content-end*/"
byline="true"
/>
</target>