2008-06-07 20:02:49 +00:00
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
jQuery UI Release!
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
Call task called 'deploy-release' to build a full release.
The release built will be stored on 'dist' dir.
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
@author Eduardo Lundgren (eduardo.lundgren@gmail.com)
-->
<project name= "jquery-ui" default= "deploy-release" basedir= "." >
2008-11-20 05:07:42 +00:00
2008-11-20 13:42:56 +00:00
<target name= "deploy-release" depends= "load.properties, concatenate, minify, pack, copy, replace-version, zip" description= "Release builder" >
2008-06-07 20:02:49 +00:00
</target>
<target name= "load.properties" >
<property file= "ant.properties" />
2008-11-20 13:42:56 +00:00
<property name= "current.version" value= "1.6pre" />
<property name= "release.version" value= "1.6" />
<property name= "release.filename" value= "jquery.ui-${release.version}" />
2008-11-20 05:07:42 +00:00
2008-11-20 13:42:56 +00:00
<property name= "dist.dir" value= "dist/${release.filename}/" />
2008-06-07 20:02:49 +00:00
<property name= "build.dir" value= "build" />
<property name= "ui.dir" value= "../" />
<property name= "src.dir" value= "${ui.dir}/ui/" />
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<property name= "min.folder" value= "${dist.dir}/ui/minified" />
<property name= "packed.folder" value= "${dist.dir}/ui/packed" />
2008-11-20 05:07:42 +00:00
2008-06-09 09:00:44 +00:00
<property name= "concatenated" value= "jquery.ui.all" />
2008-09-10 00:26:11 +00:00
<property name= "concatenated.i18n" value= "jquery.ui.i18n.all" />
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<property name= "core.files" value= "ui.core.js, ui.draggable.js, ui.droppable.js, ui.resizable.js, ui.selectable.js, ui.sortable.js, effects.core.js" />
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<property description= "YUI Compressor" name= "yui-jar" value= "${build.dir}/yuicompressor.jar" />
2008-11-20 05:07:42 +00:00
<property description= "Dean Edwards Packer" name= "pack.php" value= "${build.dir}/pack.php" />
</target>
<target name= "replace-version" depends= "load.properties" >
2008-11-20 13:42:56 +00:00
<replaceregexp match= "@VERSION" replace= "${release.version}" flags= "g" byline= "true" >
2008-11-20 05:07:42 +00:00
<fileset dir= "${dist.dir}/ui/" includes= "*.js" />
</replaceregexp>
2008-11-20 13:42:56 +00:00
<echo message= "Replaced all @VERSION to ${release.version}." />
<replaceregexp match= "${current.version}" replace= "${release.version}" flags= "g" byline= "true" >
<fileset dir= "${dist.dir}/" includes= "version.txt" />
</replaceregexp>
<echo message= "Update version to ${release.version} into version.txt." />
</target>
<target description= "Zip the package" name= "zip" >
<zip destfile= "${dist.dir}/../${release.filename}.zip" >
<zipfileset dir= "${dist.dir}/" />
</zip>
2008-06-07 20:02:49 +00:00
</target>
<target name= "concatenate" depends= "load.properties" >
<echo message= "Building concatenated" />
<mkdir dir= "${dist.dir}/ui/" />
<delete file= "${dist.dir}/ui/${concatenated}.js" />
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<concat destfile= "${dist.dir}/ui/${concatenated}.js" >
<filelist dir= "${src.dir}/" files= "${core.files}" />
<fileset dir= "${src.dir}/" includes= "ui.*.js, effects.*.js" excludes= "${core.files}" />
</concat>
<echo message= "Concatenated built." />
2008-09-10 00:26:11 +00:00
<mkdir dir= "${dist.dir}/ui/i18n/" />
<delete file= "${dist.dir}/ui/i18n/${concatenated.i18n}.js" />
2008-11-20 05:07:42 +00:00
2008-09-10 00:26:11 +00:00
<concat destfile= "${dist.dir}/ui/i18n/${concatenated.i18n}.js" encoding= "utf-8" >
<fileset dir= "${src.dir}/i18n/" includes= "ui.*.js" />
</concat>
<echo message= "Concatenated i18n built." />
2008-06-07 20:02:49 +00:00
</target>
<target name= "minify" depends= "load.properties, concatenate" description= "Remove all comments and whitespace, no compression, great in combination with GZip" >
<echo message= "Building minified" />
<delete dir= "${min.folder}/" />
<mkdir dir= "${min.folder}" />
2008-11-20 05:07:42 +00:00
<delete dir= "${min.folder}/i18n/" />
<mkdir dir= "${min.folder}/i18n/" />
2008-06-07 20:02:49 +00:00
<apply executable= "java" parallel= "false" >
<filelist dir= "${dist.dir}/ui/" files= "${concatenated}.js" />
<fileset dir= "${src.dir}/" includes= "ui.*.js, effects.*.js" />
<arg line= "-jar" />
<arg path= "${yui-jar}" />
<srcfile />
<arg line= "-o" />
<mapper type= "glob" from= "*.js" to= "${min.folder}/*.min.js" />
<targetfile />
</apply>
<echo message= "Minified built." />
2008-11-20 05:07:42 +00:00
<apply executable= "java" parallel= "false" >
<filelist dir= "${dist.dir}/ui/i18n/" files= "${concatenated.i18n}.js" />
<fileset dir= "${src.dir}/i18n/" includes= "ui.*.js" />
<arg line= "-jar" />
<arg path= "${yui-jar}" />
2008-06-07 20:02:49 +00:00
<srcfile />
2008-11-20 05:07:42 +00:00
<arg line= "-o" />
<mapper type= "glob" from= "*.js" to= "${min.folder}/i18n/*.min.js" />
2008-06-07 20:02:49 +00:00
<targetfile />
</apply>
2008-11-20 05:07:42 +00:00
<echo message= "Minified i18n built." />
2008-06-07 20:02:49 +00:00
</target>
2008-11-20 05:07:42 +00:00
<!-- Using PHP Dean Edwards Packer -->
2008-06-07 20:02:49 +00:00
<target name= "pack" depends= "load.properties, concatenate" description= "Remove all comments and whitespace and compress" >
<echo message= "Building packed" />
<delete dir= "${packed.folder}/" />
<mkdir dir= "${packed.folder}" />
2008-11-20 05:07:42 +00:00
<delete dir= "${packed.folder}/i18n/" />
<mkdir dir= "${packed.folder}/i18n/" />
<apply executable= "php" parallel= "false" >
2008-06-07 20:02:49 +00:00
<filelist dir= "${min.folder}" files= "${concatenated}.min.js" />
<fileset dir= "${min.folder}" includes= "ui.*.min.js, effects.*.min.js" />
2008-11-20 05:07:42 +00:00
<arg path= "${pack.php}" />
2008-06-07 20:02:49 +00:00
<srcfile />
<mapper type= "glob" from= "*.min.js" to= "${packed.folder}/*.packed.js" />
<targetfile />
</apply>
<echo message= "Packed built." />
2008-11-20 05:07:42 +00:00
<apply executable= "php" parallel= "false" >
<filelist dir= "${min.folder}/i18n/" files= "${concatenated.i18n}.min.js" />
<fileset dir= "${min.folder}/i18n/" includes= "ui.*.min.js" />
<arg path= "${pack.php}" />
<srcfile />
<mapper type= "glob" from= "*.min.js" to= "${packed.folder}/i18n/*.packed.js" />
<targetfile />
</apply>
<echo message= "Packed i18n built." />
2008-06-07 20:02:49 +00:00
</target>
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<target description= "Copy needed folders" name= "copy" depends= "load.properties" >
<echo message= "Copying files" />
<mkdir dir= "${dist.dir}" />
2008-11-20 05:07:42 +00:00
2008-06-09 08:06:59 +00:00
<copy overwrite= "true" todir= "${dist.dir}/" >
<fileset dir= "${ui.dir}/" includes= "jquery-*.js" />
</copy>
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<copy overwrite= "true" todir= "${dist.dir}/ui/" >
<fileset dir= "${src.dir}/" includes= "ui.*.js, effects.*.js" />
</copy>
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<copy overwrite= "true" todir= "${dist.dir}/ui/i18n/" >
<fileset dir= "${src.dir}/i18n/" />
</copy>
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<copy overwrite= "true" todir= "${dist.dir}/" >
<fileset dir= "${ui.dir}/" includes= "*.txt" />
</copy>
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<copy overwrite= "true" todir= "${dist.dir}/demos/" >
<fileset dir= "${ui.dir}/demos/" />
</copy>
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<copy overwrite= "true" todir= "${dist.dir}/tests/" >
<fileset dir= "${ui.dir}/tests/" />
</copy>
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
<copy overwrite= "true" todir= "${dist.dir}/themes/" >
<fileset dir= "${ui.dir}/themes/" />
</copy>
<echo message= "Files copied." />
</target>
2008-11-20 13:42:56 +00:00
2008-06-07 20:02:49 +00:00
<target depends= "load.properties" name= "clean" >
<delete dir= "${dist.dir}" />
</target>
2008-11-20 05:07:42 +00:00
2008-06-07 20:02:49 +00:00
</project>