123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- <project name="extjs" default="build" basedir=".">
- <target name="init-antcontrib">
- <taskdef resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <pathelement location="${cmd.dir}/lib/ant-contrib-1.0b3.jar"/>
- <pathelement
- location="${cmd..dir}/lib/commons-httpclient-3.0.1.jar"/>
- <pathelement
- location="${cmd.dir}/lib/commons-logging-1.0.4.jar"/>
- <pathelement location="${cmd.dir}/lib/commons-codec-1.3.jar"/>
- </classpath>
- </taskdef>
- </target>
- <target name="init-sencha-cmd" depends="init-antcontrib">
- <taskdef resource="com/sencha/ant/antlib.xml" classpath="${cmd.dir}/sencha.jar"/>
- </target>
- <target name="build" depends="init-sencha-cmd">
- <property name="build.dir" location="${basedir}"/>
- <!--
- Produce base concatenation for standard distribution files
- -->
- <x-sencha-command>
- compile
- --ignore=diag
- --options=debug:true
- concatenate
- -out=${build.dir}/ext-all-dev.js
- and
- concatenate
- -sandbox=Ext4:x4-
- -out=${build.dir}/builds/ext-all-sandbox-dev.js
- and
- union
- -tag=core
- and
- concatenate
- -out=${build.dir}/ext-dev.js
- and
- concatenate
- -out=${build.dir}/builds/ext-core-dev.js
- and
- union
- -tag=foundation
- and
- concatenate
- -out=${build.dir}/builds/ext-foundation-dev.js
- and
- include
- -all
- and
- --options=debug:false
- concatenate
- -out=${build.dir}/ext-all-debug-w-comments.js
- and
- concatenate
- -sandbox=Ext4:x4-
- -out=${build.dir}/builds/ext-all-sandbox-debug-w-comments.js
- and
- union
- -tag=core
- and
- concatenate
- -out=${build.dir}/ext-debug-w-comments.js
- and
- concatenate
- -out=${build.dir}/builds/ext-core-debug-w-comments.js
- and
- union
- -tag=foundation
- and
- concatenate
- -out=${build.dir}/builds/ext-foundation-debug-w-comments.js
- and
- union
- -not
- -tag=${build.dir}/core
- and
- metadata
- +append
- +alternates
- -base-path=${build.dir}
- -output-file=${build.dir}/ext-debug-w-comments.js
- and
- metadata
- +append
- +alternates
- -base-path=${build.dir}
- -output-file=${build.dir}/ext-dev.js
- and
- metadata
- +append
- +alias
- --base-path=${build.dir}
- --output-file=${build.dir}/ext-debug-w-comments.js
- and
- metadata
- +append
- +alias
- --base-path=${build.dir}
- --output-file=${build.dir}/ext-dev.js
- </x-sencha-command>
- <loadfile property="header.text" srcfile="${build.dir}/license.txt"/>
- <property name="header.comment" value="/* ${header.text} */ "/>
- <!--
- Strip comments from uncompressed builds
- -->
- <x-strip-js srcfile="${build.dir}/ext-all-debug-w-comments.js"
- outfile="${build.dir}/ext-all-debug.js"/>
- <x-strip-js srcfile="${build.dir}/ext-debug-w-comments.js"
- outfile="${build.dir}/ext-debug.js"/>
- <x-strip-js srcfile="${build.dir}/builds/ext-core-debug-w-comments.js"
- outfile="${build.dir}/builds/ext-core-debug.js"/>
- <x-strip-js srcfile="${build.dir}/builds/ext-foundation-debug-w-comments.js"
- outfile="${build.dir}/builds/ext-foundation-debug.js"/>
- <x-strip-js srcfile="${build.dir}/builds/ext-all-sandbox-debug-w-comments.js"
- outfile="${build.dir}/builds/ext-all-sandbox-debug.js"/>
- <!--
- Apply yui compressor
- -->
- <x-compress-js
- srcfile="${build.dir}/ext-all-debug.js"
- outfile="${build.dir}/ext-all.js"/>
- <x-compress-js
- srcfile="${build.dir}/ext-debug.js"
- outfile="${build.dir}/ext.js"/>
- <x-compress-js
- srcfile="${build.dir}/builds/ext-core-debug.js"
- outfile="${build.dir}/builds/ext-core.js"/>
- <x-compress-js
- srcfile="${build.dir}/builds/ext-foundation-debug.js"
- outfile="${build.dir}/builds/ext-foundation.js"/>
- <x-compress-js
- srcfile="${build.dir}/builds/ext-all-sandbox-debug.js"
- outfile="${build.dir}/builds/ext-all-sandbox.js"/>
- <!--
- Add license headers
- -->
- <for param="file">
- <path>
- <fileset dir="${build.dir}" includes="*.js"/>
- <fileset dir="${build.dir}/builds" includes="*.js"/>
- </path>
- <sequential>
- <move file="@{file}" tofile="@{file}.tmp"/>
- <concat destfile="@{file}">
- <header>${header.comment}</header>
- <fileset file="@{file}.tmp"/>
- </concat>
- <delete file="@{file}.tmp"/>
- </sequential>
- </for>
- </target>
- </project>
|