Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

209 lines (178 sloc) 8.142 kb
<?xml version="1.0" encoding="UTF-8"?>
<project name="Plupload" default="build" basedir=".">
<!-- Properties -->
<property description="Temp directory" name="tmp_dir" value="tmp" />
<!-- Setup classpath for js-build-tools ant tasks -->
<path id="tasks.classpath">
<pathelement location="."/>
<fileset dir="tools/ant">
<include name="**/*.jar"/>
<!-- Exclude jslint since it also has the Rhino API -->
<exclude name="**/jslint4java.jar"/>
</fileset>
</path>
<!-- Task definitions - register new js-build-tools ant tasks -->
<taskdef name="preprocess" classname="com.moxiecode.ant.tasks.PreProcessTask" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef name="yuicompress" classname="com.moxiecode.ant.tasks.YuiCompressTask" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef name="moxiedoc" classname="com.moxiecode.ant.tasks.MoxieDocTask" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef name="jslint" classname="com.googlecode.jslint4java.ant.JSLintTask" classpath="tools/ant/jslint4java.jar" />
<!-- Generate JS documentation -->
<target name="moxiedoc" depends="" description="Generates HTML documentation out of js source">
<delete quiet="true">
<fileset dir="docs/api" includes="**/*"/>
</delete>
<mkdir dir="docs" />
<moxiedoc outdir="docs/api" templatedir="tools/templates" msintellisense="docs/api/plupload.vsdoc.js" title="Plupload API">
<fileset dir="src">
<exclude name="jquery.*" />
<include name="javascript/**/*.js" />
</fileset>
</moxiedoc>
</target>
<target name="jslint">
<jslint options="browser,undef,forin">
<formatter type="plain" />
<formatter type="xml" destfile="jslint.xml" />
<fileset dir="src/javascript" includes="*.js" />
</jslint>
</target>
<target name="build-flash">
<exec executable="mxmlc">
<arg value="-compiler.source-path=./src/flash/plupload/src" />
<arg value="-target-player=10.1.0" />
<arg value="-static-link-runtime-shared-libraries=true" />
<!-- <arg value="-compiler.debug" /> -->
<arg value="-output=./js/plupload.flash.swf" />
<arg value="./src/flash/plupload/src/com/plupload/Plupload.as" />
</exec>
</target>
<target name="clean">
<delete quiet="true">
<fileset dir="js" includes="**/*">
<exclude name="plupload.flash.swf"/>
<exclude name="plupload.silverlight.xap"/>
</fileset>
</delete>
</target>
<target name="build-jquery-widgets">
<!-- Copy all jquery.plupload.queue resources -->
<copy todir="js/jquery.plupload.queue">
<fileset dir="src/javascript/jquery.plupload.queue">
<include name="**"/>
</fileset>
</copy>
<!-- Copy all jquery.ui.plupload resources -->
<copy todir="js/jquery.ui.plupload">
<fileset dir="src/javascript/jquery.ui.plupload">
<include name="**"/>
</fileset>
</copy>
<!-- Minify the scripts -->
<yuicompress infile="src/javascript/jquery.plupload.queue/jquery.plupload.queue.js" outfile="js/jquery.plupload.queue/jquery.plupload.queue.js" />
<yuicompress infile="src/javascript/jquery.ui.plupload/jquery.ui.plupload.js" outfile="js/jquery.ui.plupload/jquery.ui.plupload.js" />
</target>
<target name="build" depends="clean,build-jquery-widgets">
<!-- Concat multuple JS files together -->
<concat destfile="js/plupload.full.tmp.js">
<fileset dir="src/javascript" includes="plupload.js" />
<fileset dir="src/javascript" includes="plupload.gears.js" />
<fileset dir="src/javascript" includes="plupload.silverlight.js" />
<fileset dir="src/javascript" includes="plupload.flash.js" />
<fileset dir="src/javascript" includes="plupload.browserplus.js" />
<fileset dir="src/javascript" includes="plupload.html5.js" />
<fileset dir="src/javascript" includes="plupload.html4.js" />
</concat>
<!-- Compress Plupload full and base using the YUI Compressor -->
<yuicompress infile="js/plupload.full.tmp.js" outfile="js/plupload.full.js" />
<yuicompress infile="src/javascript/plupload.js" outfile="js/plupload.js" />
<yuicompress infile="src/javascript/plupload.gears.js" outfile="js/plupload.gears.js" />
<yuicompress infile="src/javascript/plupload.silverlight.js" outfile="js/plupload.silverlight.js" />
<yuicompress infile="src/javascript/plupload.flash.js" outfile="js/plupload.flash.js" />
<yuicompress infile="src/javascript/plupload.browserplus.js" outfile="js/plupload.browserplus.js" />
<yuicompress infile="src/javascript/plupload.html5.js" outfile="js/plupload.html5.js" />
<yuicompress infile="src/javascript/plupload.html4.js" outfile="js/plupload.html4.js" />
<delete file="js/plupload.full.tmp.js" quiet="true" />
</target>
<target name="release" depends="build">
<!-- Copy the current repos and start processing it -->
<delete dir="${tmp_dir}" quiet="true" />
<copy todir="${tmp_dir}/plupload">
<fileset dir=".">
<include name="**"/>
<exclude name="**/.git/**"/>
<exclude name="**/.*"/>
<exclude name="**/bin/**"/>
<exclude name="**/obj/**"/>
<exclude name="**/tmp/**"/>
<exclude name="**/jslint.xml"/>
</fileset>
</copy>
<copy todir="${tmp_dir}/plupload/js">
<fileset dir="js/">
<include name="plupload.flash.swf"/>
<include name="plupload.silverlight.xap"/>
</fileset>
</copy>
<!-- Copy languages -->
<copy todir="${tmp_dir}/plupload/js/i18n">
<fileset dir="src/javascript/i18n">
<include name="**"/>
</fileset>
</copy>
<!-- Parse minor version, major version and release date from changelog -->
<loadfile property="changelog" srcFile="${tmp_dir}/plupload/changelog.txt" />
<propertyregex property="version" input="${changelog}" regexp="^Version ([0-9xabrc.]+)" select="\1" />
<propertyregex property="release_date" input="${changelog}" regexp="^Version [^\(]+\(([^\)]+)\)" select="\1" />
<propertyregex property="file_version" input="${version}" regexp="\." replace="_" />
<!-- Replace major version -->
<replaceregexp byline="true">
<regexp pattern="@@version@@" />
<substitution expression="${version}" />
<fileset dir="${tmp_dir}/plupload/js">
<include name="*/**" />
</fileset>
</replaceregexp>
<!-- Compress dev package -->
<delete file="${tmp_dir}/plupload_${file_version}_dev.zip" quiet="true" />
<zip destfile="${tmp_dir}/plupload_${file_version}_dev.zip">
<zipfileset dir="${tmp_dir}/plupload" prefix="plupload">
<include name="*/**" />
</zipfileset>
</zip>
<!-- Load proper versions of scripts in examples -->
<replaceregexp byline="true">
<regexp pattern="src\/javascript\/" />
<substitution expression="js\/" />
<fileset dir="${tmp_dir}/plupload/examples">
<include name="*/**" />
</fileset>
</replaceregexp>
<!-- Compress core package -->
<delete file="${tmp_dir}/plupload_${file_version}.zip" quiet="true" />
<zip destfile="${tmp_dir}/plupload_${file_version}.zip">
<zipfileset dir="${tmp_dir}/plupload" prefix="plupload">
<include name="*/**" />
<!-- <exclude name="examples/jquery/**" /> -->
<exclude name="src/**" />
<!-- <exclude name="js/jquery*/**" /> -->
<exclude name="tools/**" />
<exclude name="build.xml" />
<exclude name="build.bat" />
<exclude name="tests/**" />
</zipfileset>
</zip>
<!-- Compress jQuery package -->
<!--<delete file="${tmp_dir}/plupload_${file_version}_jquery.zip" quiet="true" />
<zip destfile="${tmp_dir}/plupload_${file_version}_jquery.zip">
<zipfileset dir="${tmp_dir}/plupload" prefix="plupload">
<include name="*/**" />
<exclude name="src/**" />
<exclude name="tools/**" />
<exclude name="build.xml" />
<exclude name="build.bat" />
<exclude name="tests/**" />
</zipfileset>
</zip>-->
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.