Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

SO#14457508 - build.xml

By: hbabayan on Feb 8th, 2013  |  syntax: XML  |  size: 1.91 KB  |  hits: 100  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <project name="MyApp" default=".help">
  3.     <import file="${basedir}/.sencha/app/build-impl.xml"/>
  4.  
  5.     <target name="-before-build">
  6.  
  7.         <echo message="Collecting all controllers in application class property ... "/>
  8.         <fileset id="app_controllers" dir="${app.dir}/app/controller" casesensitive="yes">
  9.             <include name="**/*.js"/>
  10.         </fileset>
  11.         <pathconvert pathsep="," property="app_controller_names" refid="app_controllers" targetos="unix">
  12.             <chainedmapper>
  13.                 <globmapper from="${app.dir}/app/*" to="${ant.project.name}/*" casesensitive="no" handledirsep="yes"/>
  14.                 <chainedmapper>
  15.                     <regexpmapper from="^(.*)\.js$$" to='"\1"'/>
  16.                     <filtermapper>
  17.                         <replacestring from="/" to="."/>
  18.                         <replacestring from="\" to="."/>
  19.                     </filtermapper>
  20.                 </chainedmapper>
  21.             </chainedmapper>
  22.         </pathconvert>
  23.         <echo message="Collected controllers: ${app_controller_names}"/>
  24.  
  25.         <echo message="Injecting into app.js ..."/>
  26.         <replaceregexp file="${app.dir}/app/app.js"
  27.                       match="/\*ant-generated-content-start\*/(.*)/\*ant-generated-content-end\*/"
  28.                       replace="/*ant-generated-content-start*/ ${app_controller_names} /*ant-generated-content-end*/"
  29.                       byline="true"
  30.                />
  31.     </target>
  32.  
  33.     <target name="-after-build">
  34.         <echo message="Reverting to original app.js ..."/>
  35.         <replaceregexp file="${app.dir}/app/app.js"
  36.                       match="/\*ant-generated-content-start\*/(.*)/\*ant-generated-content-end\*/"
  37.                       replace="/*ant-generated-content-start*/ /*ant-generated-content-end*/"
  38.                       byline="true"
  39.                />
  40.     </target>
  41.  
  42. </project>