blob: 9fd4ac49b67b6c987450f28e54e27061cea4148b [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="sdk" default="main" basedir=".">
<property name="FLEX_HOME" location="${basedir}"/>
<!-- Required for OSX 10.6 / Snow Leopard Performance. -->
<!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
<!-- local.d32 is set/used in build.properties so this needs to be done first. -->
<condition property="local.d32" value="-d32">
<and>
<os family="windows"/>
<equals arg1="${sun.arch.data.model}" arg2="64"/>
<equals arg1="${os.arch}" arg2="x86_64"/>
<equals arg1="${ant.java.version}" arg2="1.6"/>
</and>
</condition>
<property file="${FLEX_HOME}/env.properties"/>
<property environment="env"/>
<property file="${FLEX_HOME}/local.properties"/>
<property file="${FLEX_HOME}/build.properties"/>
<property name="debug" value="true"/>
<property name="strict" value="true"/>
<property name="javac.src" value="1.5"/>
<property name="kit.prefix" value="apache-flex-sdk-${release.version}"/>
<property name="kit-pixelbender.prefix" value="apache-flex-sdk-pixel-bender-1.0.0"/>
<property name="source.kit" value="${kit.prefix}-src"/>
<property name="binary.kit" value="${kit.prefix}-bin"/>
<property name="source-pixelbender.kit" value="${kit-pixelbender.prefix}-src"/>
<property name="binary-pixelbender.kit" value="${kit-pixelbender.prefix}-bin"/>
<available file="${FLEX_HOME}/../flex-tlf/textLayout"
type="dir"
property="TLF_HOME"
value="${FLEX_HOME}/../flex-tlf" />
<available file="${FLEX_HOME}/../tlf/textLayout"
type="dir"
property="TLF_HOME"
value="${FLEX_HOME}/../tlf" />
<available file="${env.TLF_HOME}"
type="dir"
property="TLF_HOME"
value="${env.TLF_HOME}"/>
<available file="${FLEX_HOME}/frameworks/projects/textLayout/src"
type="dir"
property="TLF_HOME"
value="${FLEX_HOME}/frameworks/projects" />
<tstamp>
<format property="build.number.date" pattern="yyyyMMdd" />
</tstamp>
<property name="build.version" value="${release.version}.${build.number.date}" />
<!--
Optional jars but should be in place for a real release build.
For <grep> put antelopetasks*.jar in this path.
See version-update.
For <rat> apache-rat-0.8.jar and apache-rat-tasks-0.8.jar should be in classpath.
See rat-check.
-->
<path id="anttask.classpath">
<fileset dir="${env.ANT_HOME}/lib">
<include name="**/antelopetasks*.jar"/>
<include name="**/apache-rat*.jar"/>
</fileset>
<fileset dir="${user.home}">
<include name=".ant/lib/**/antelopetasks*.jar"/>
<include name=".ant/lib/**/apache-rat*.jar"/>
</fileset>
</path>
<!--
Notes: If you're running the main target, then there is no need to call clean first.
Each of the main targets for the modules will call clean themselves before proceeding.
-->
<target name="main" depends="prebuild,modules,frameworks,post-build" description="Full build">
<tstamp>
<format property="build.datetime" pattern="MM/dd/yyyy hh:mm:ss aa" />
</tstamp>
<echo>ant main target completed on ${build.datetime}</echo>
</target>
<target name="dev" depends="modules-dev" description="Runs src.depend build for development"/>
<!--
Can set build.additional-packages to build additional-packages as part of a release.
This does not build the docs. Use doc-packages or asdoc-packages.
-->
<target name="release"
depends="check-compile-env,check-runtime-env,check-adobe-extension-manager-env,source-release,binary-release,rat-check"
description="Creates source and binary kits for Apache Flex."/>
<target name="release-pixelbender"
depends="check-compile-env,check-runtime-env,source-package-pixelbender,binary-package-pixelbender"
description="Creates source and binary kits for Apache Flex's Pixel Bender package."/>
<target name="source-release"
depends="super-clean,create-description,create-config,source-package"
description="Packages the source release kit which is the official Apache release."/>
<target name="binary-release"
depends="setup-binary-release,main,frameworks-rsls,sample-themes,checkintests,doc,other.locales,binary-package,additional-packages"
description="Builds and packages the binary kit which is provided as a convenience."/>
<target name="source-release-noclean"
depends="create-description,create-config,source-package"
description="Packages the source release kit which is the official Apache release."/>
<target name="binary-release-noclean"
depends="main,frameworks-rsls,sample-themes,checkintests,doc,other.locales,binary-package,additional-packages"
description="Builds and packages the binary kit which is provided as a convenience."/>
<target name="doc-packages"
depends="asdoc-package,javadocs"
description="Build and package the asdocs for the framework clases and the javadocs."/>
<target name="additional-packages"
depends="ja-locale-samples,antTasks-package"
description="Package locale-samples and antTasks."/>
<target name="help">
<echo message="run ant -projecthelp to see the available targets"/>
</target>
<!--
To clean these you must call thirdparty-clean or super-clean to clean everything.
clean does not remove these since they don't change often and the downloads take time.
-->
<target name="thirdparty-downloads" description="Downloads all the required thirdparty code.">
<ant dir="${basedir}/frameworks" target="thirdparty-downloads"/>
<ant dir="${basedir}/modules" target="thirdparty-downloads"/>
<!-- don't ask again about these since we just did if these weren't already set -->
<property name="build.noprompt" value="set" />
</target>
<target name="prebuild" depends="check-compile-env,thirdparty-downloads,create-description"
description="Stuff that needs to be done before any builds." />
<target name="check-compile-env" depends="check-playerglobal-home,check-air-home,check-tlf-home"
description="Check for the required environment variables for compilation.">
<echo>OS: ${os.name} / ${os.version} / ${os.arch}</echo>
<echo>VM: ${java.vm.name} / ${java.vm.version}</echo>
<echo>Java: ${java.version}</echo>
<echo>Ant: ${ant.version} Ant Java Version: ${ant.java.version}</echo>
</target>
<target name="check-playerglobal-home" unless="playerglobal.swc.exists"
description="Check PLAYERGLOBAL_HOME for both a directory and a swc file">
<echo message="PLAYERGLOBAL_HOME is ${env.PLAYERGLOBAL_HOME}"/>
<echo message="playerglobal.version is ${playerglobal.version}"/>
<available file="${env.PLAYERGLOBAL_HOME}"
type="dir"
property="PLAYERGLOBAL_HOME.set"/>
<fail message="The environment variable PLAYERGLOBAL_HOME is not set to a directory"
unless="PLAYERGLOBAL_HOME.set"/>
<property name="playerglobal.swc"
value="${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
<available file="${playerglobal.swc}"
type="file"
property="playerglobal.swc.exists"/>
<fail message="The file ${playerglobal.swc} does not exist"
unless="playerglobal.swc.exists"/>
<echo message="playerglobal.swc is ${playerglobal.swc}"/>
</target>
<target name="check-air-home" unless="AIR_HOME.set"
description="Check that AIR_HOME is a directory">
<echo message="AIR_HOME is ${env.AIR_HOME}"/>
<condition property="AIR_HOME.set">
<and>
<length string="${env.AIR_HOME}" when="greater" length="0" />
<available file="${env.AIR_HOME}" type="dir"/>
<!--available file="${env.AIR_HOME}/bin/adt" type="file"/-->
</and>
</condition>
<fail message="The environment variable AIR_HOME must be set to the AIR SDK Kit directory"
unless="AIR_HOME.set"/>
</target>
<target name="check-tlf-home" unless="TLF_HOME"
description="Check TLF_HOME is a directory.">
<echo message="TLF_HOME is ${env.TLF_HOME}"/>
<available file="${env.TLF_HOME}"
type="dir"
property="TLF_HOME"
value="${env.TLF_HOME}"/>
<fail message="TLF_HOME must be set correctly for a release build"
unless="TLF_HOME"/>
</target>
<target name="check-adobe-extension-manager-env" unless="ADOBE_EXTENSION_MANAGER.set"
description="Check ADOBE_EXTENSION_MANAGER is a directory.">
<echo message="ADOBE_EXTENSION_MANAGER is ${env.ADOBE_EXTENSION_MANAGER}"/>
<available file="${env.ADOBE_EXTENSION_MANAGER}"
type="file"
property="ADOBE_EXTENSION_MANAGER.set"/>
<fail message="ADOBE_EXTENSION_MANAGER must be set correctly for a release build"
unless="ADOBE_EXTENSION_MANAGER.set"/>
</target>
<target name="create-description" description="Generate flex-sdk-description.xml">
<echo message="build.number is ${build.number.date}"/>
<echo file="${basedir}/flex-sdk-description.xml">&lt;?xml version="1.0"?&gt;
&lt;!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--&gt;
&lt;flex-sdk-description&gt;
&lt;name&gt;${release} FP${playerglobal.version} AIR${air.version} ${locale}&lt;/name&gt;
&lt;version&gt;${release.version}&lt;/version&gt;
&lt;build&gt;${build.number.date}&lt;/build&gt;
&lt;/flex-sdk-description&gt;
</echo>
</target>
<target name="create-config" description="Create flex config file">
<ant dir="${basedir}/frameworks" target="flex-config" />
</target>
<target name="setup-binary-release" depends="thirdparty-clean"
description="Set properties needed to turn on features for release sdk">
<!--
For a release build, download everything fresh.
Build changes to the downloads, might not be caught by the refresh logic.
thirdparty-clean should leave this directory empty but just in case...
-->
<delete dir="${basedir}/in" failonerror="false" includeEmptyDirs="true" />
<!-- generate localized compiler message jars -->
<property name="localized.jars" value="true" />
</target>
<!--
Cleanup
-->
<target name="super-clean" depends="thirdparty-clean,clean" description="Cleans everything including thirdparty downloads."/>
<target name="thirdparty-clean" description="Removes all thirdparty downloads.">
<ant dir="${basedir}/modules" target="thirdparty-clean"/>
<ant dir="${basedir}/frameworks" target="thirdparty-clean"/>
<delete dir="${basedir}/in"/>
<delete dir="${basedir}/lib"/>
</target>
<target name="clean" depends="modules-clean,frameworks-clean,frameworks-clean,frameworks-rsls-clean,package-clean,checkintests-clean"
description="Full clean excluding thirdparty downloads">
<delete file="${basedir}/flex-sdk-description.xml" failonerror="false"/>
<delete file="${basedir}/rat*.report" failonerror="false"/>
<delete dir="${basedir}/samples/themes" failonerror="false">
<include name="**/*.swc"/>
<include name="**/*.swf"/>
</delete>
<!-- These directory would exist if the AIR SDK was merged in. -->
<delete dir="${basedir}/lib" failonerror="false" includeEmptyDirs="true">
<include name="aot/**"/>
<include name="nai/**"/>
<include name="win/**"/>
</delete>
<delete dir="${basedir}/out" failonerror="false" includeEmptyDirs="true"/>
<delete dir="${basedir}/temp" failonerror="false" includeEmptyDirs="true"/>
<delete dir="${basedir}/tempDoc" failonerror="false" includeEmptyDirs="true"/>
<ant dir="${basedir}/asdoc" target="clean" />
<ant dir="${basedir}/ide/flashbuilder" target="clean" />
<ant dir="${basedir}/mustella" target="clean"/>
</target>
<target name="modules-clean">
<ant dir="${basedir}/modules" target="clean"/>
</target>
<target name="frameworks-clean">
<ant dir="${basedir}/frameworks" target="clean"/>
</target>
<target name="frameworks-rsls-clean">
<delete dir="${basedir}/frameworks/rsls" includeEmptyDirs="true" quiet="true"/>
</target>
<target name="package-clean">
<delete dir="${basedir}/out" failonerror="false" includeEmptyDirs="true"/>
<antcall target="clean-temp"/>
</target>
<target name="checkintests-clean" depends="clean-dependencychecker">
<delete file="${basedir}/frameworks/tests/AIRExamples/AIRDemo.swf" failonerror="false"/>
<delete dir="${basedir}/frameworks/tests/airMobileBasicTests/bin-debug" failonerror="false"/>
<delete file="${basedir}/frameworks/tests/checkinapp/checkinapp.swf" failonerror="false"/>
<delete file="${basedir}/frameworks/tests/componentSmoke/componentSmoke2.swf" failonerror="false"/>
<delete file="${basedir}/frameworks/tests/spark/sparkTest.swf" failonerror="false"/>
<delete file="${basedir}/frameworks/tests/fxgCompile/fxgCompileTest.swf" failonerror="false"/>
<delete file="${basedir}/frameworks/tests/graphics/GraphicTags_checkin.swf" failonerror="false"/>
<delete file="${basedir}/frameworks/tests/basicTests/BasicTests.swf" failonerror="false"/>
<delete file="${basedir}/frameworks/tests/basicTests/basicLoader.swf" failonerror="false"/>
<delete file="${basedir}/frameworks/tests/basicTests/spark/views/HelloWorld.swf" failonerror="false"/>
<delete file="${basedir}/frameworks/tests/basicTests/spark/views/StyleManagerModuleTest.swf" failonerror="false"/>
<delete file="${basedir}/mustella/MustellaResultsParser.class" failonerror="false"/>
<!-- not currently in Apache Flex -->
<!--
<ant dir="${basedir}/frameworks/tests/layout" target="clean"/>
<ant dir="${basedir}/frameworks/tests/states" target="clean"/>
-->
<ant dir="${basedir}/mustella" target="cleanmustellaswc"/>
</target>
<target name="player-clean">
<delete dir="${basedir}/in/player" failonerror="false" includeEmptyDirs="true"/>
</target>
<!--
Build Java module JARs
-->
<target name="modules" description="Full build of all JARs">
<ant dir="${basedir}/modules"/>
</target>
<target name="modules-dev" description="Build src.depend JARs">
<ant dir="${basedir}/modules" target="dev"/>
</target>
<target name="antTasks" description="Full build of antTasks" unless="antTasks.compiled" >
<ant dir="${basedir}/modules/antTasks"/>
<property name="antTasks.compiled" value="true"/>
</target>
<!--
Build framework SWCs
-->
<target name="frameworks" description="Full build of all framework SWCs, including resource bundles and themes">
<ant dir="${basedir}/frameworks">
<property name="locale" value="${locale}"/>
</ant>
</target>
<target name="framework-compile" description="Recompile framework.swc">
<ant dir="${basedir}/frameworks/projects/framework" target="compile">
<property name="locale" value="${locale}"/>
</ant>
</target>
<target name="spark-compile" description="Recompile spark.swc">
<ant dir="${basedir}/frameworks/projects/spark" target="compile"/>
</target>
<target name="airframework-compile" description="Recompile airframework.swc">
<ant dir="${basedir}/frameworks/projects/airframework" target="compile"/>
</target>
<target name="airspark-compile" description="Recompile airspark.swc">
<ant dir="${basedir}/frameworks/projects/airspark" target="compile"/>
</target>
<!-- Build framework RSLs -->
<macrodef name="create-rsl">
<attribute name="rsl-dir"/>
<attribute name="swc-dir"/>
<attribute name="swc-name"/>
<attribute name="build-number"/>
<sequential>
<unzip src="@{swc-dir}/@{swc-name}.swc"
dest="@{rsl-dir}" >
<patternset>
<include name="library.swf" />
</patternset>
</unzip>
<!-- optimize out metadata but keep debug info for the unsigned RSL -->
<java jar="${basedir}/lib/optimizer.jar" fork="true" failonerror="true">
<jvmarg line="-ea -DAS3 -DAVMPLUS -Dflexlib='${basedir}/frameworks' -Xms32m -Xmx384m -Dsun.io.useCanonCaches=false"/>
<arg line="'@{rsl-dir}/library.swf' --output '@{rsl-dir}/@{swc-name}_@{build-number}.swf' --keep-as3-metadata='Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient,SkinPart' --debug='true' "/>
</java>
<delete file="@{rsl-dir}/library.swf"/>
<java jar="${basedir}/lib/digest.jar" fork="true" failonerror="true">
<jvmarg line="-ea -DAS3 -DAVMPLUS -Xms32m -Xmx384m -Dsun.io.useCanonCaches=false"/>
<arg line="--digest.rsl-file '@{rsl-dir}/@{swc-name}_@{build-number}.swf' --digest.swc-path '@{swc-dir}/@{swc-name}.swc' --digest.signed=false"/>
</java>
</sequential>
</macrodef>
<target name="frameworks-rsls" description="Build signed framework RSLs">
<echo message="build.number is ${build.number.date}"/>
<!-- textLayout RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="textLayout" build-number="${release.version}.${build.number.date}"/>
<!-- framework RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="framework" build-number="${release.version}.${build.number.date}"/>
<!-- mx RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs/mx" swc-name="mx" build-number="${release.version}.${build.number.date}"/>
<!-- rpc RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="rpc" build-number="${release.version}.${build.number.date}"/>
<!-- Spark -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="spark" build-number="${release.version}.${build.number.date}"/>
<!-- sparkskins RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="sparkskins" build-number="${release.version}.${build.number.date}"/>
<!-- charts RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="charts" build-number="${release.version}.${build.number.date}"/>
<!-- advancedgrids RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="advancedgrids" build-number="${release.version}.${build.number.date}"/>
<!-- spark_dmv RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="spark_dmv" build-number="${release.version}.${build.number.date}"/>
<!-- apache RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="apache" build-number="${release.version}.${build.number.date}"/>
<!-- experimental RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="experimental" build-number="${release.version}.${build.number.date}"/>
<!-- mobile experimental RSL -->
<create-rsl rsl-dir="${basedir}/frameworks/rsls" swc-dir="${basedir}/frameworks/libs" swc-name="experimental_mobile" build-number="${release.version}.${build.number.date}"/>
</target>
<target name="other.locales" description="Build resource SWCs for additional locales">
<ant dir="${basedir}/frameworks" target="other.locales"/>
</target>
<target name="sample-themes" description="Build the sample themes">
<ant dir="${basedir}/samples/themes/arcade" target="main" />
<ant dir="${basedir}/samples/themes/cobalt" target="main" />
<ant dir="${basedir}/samples/themes/graphite" target="main" />
<!-- zen theme is missing some assets -->
<!--<ant dir="${basedir}/samples/themes/zen" target="main" /> -->
</target>
<target name="javadocs"
description="Build javadoc for compiler oem interface">
<javadoc destdir="${basedir}/javadoc" useexternalfile="yes" maxmemory="128m">
<classpath>
<fileset dir="${basedir}/lib">
<include name="flex-compiler-oem.jar"/>
</fileset>
</classpath>
<fileset dir="${basedir}/modules/compiler/src/java/flex2/tools/oem">
<include name="*.java"/>
<exclude name="**/*.properties"/>
</fileset>
</javadoc>
<mkdir dir="${basedir}/out"/>
<zip destfile="${basedir}/out/${kit.prefix}-compiler-api-javadocs.zip" basedir="${FLEX_HOME}/javadoc"/>
<delete dir="${basedir}/javadoc" failonerror="false" includeEmptyDirs="true"/>
</target>
<target name="ide" description="Build any ide specific files">
<ant dir="${basedir}/ide/flashbuilder" />
</target>
<target name="post-build" depends="ide" description="Handle post-build activities" />
<!--
Build the ASDoc html pages.
-->
<target name="asdoc" description="asdoc">
<ant dir="${basedir}/asdoc" />
</target>
<!--
Package up the Apache Flex sources. Do not include empty directories.
Note: even if cleaned, this will package up unversioned files that happen
to be in the tree.
FixMe: clean needs to clean - add code to detect unversioned files
-->
<target name="source-package" depends="stage-source,source-package-zip,source-package-tgz"
description="Package source files required to build in zip and tar-gzip file">
</target>
<target name="source-package-pixelbender" depends="stage-source-pixelbender,source-package-zip-pixelbender,source-package-tgz-pixelbender"
description="Package Pixel Bender source files required to build in zip and tar-gzip file">
</target>
<!--
Packages the source distribution with ZIP.
-->
<target name="source-package-zip" unless="no.zip">
<mkdir dir="${basedir}/out"/>
<zip destfile="${basedir}/out/${source.kit}.zip" basedir="${basedir}/temp"/>
</target>
<target name="source-package-zip-pixelbender" unless="no.zip">
<mkdir dir="${basedir}/out"/>
<zip destfile="${basedir}/out/${source-pixelbender.kit}.zip" basedir="${basedir}/temp"/>
</target>
<!--
Packages the source distribution with TAR-GZIP.
-->
<target name="source-package-tgz" unless="no.zip">
<tar-gzip name="${source.kit}" />
</target>
<target name="source-package-tgz-pixelbender" unless="no.zip">
<tar-gzip name="${source-pixelbender.kit}" />
</target>
<target name="stage-source"
description="Package source files required to build in zip file">
<antcall target="clean-temp"/>
<copy todir="${basedir}/temp" includeEmptyDirs="false">
<fileset dir="${basedir}">
<include name="apache-flex-sdk-installer-config.xml"/>
<include name="build.xml"/>
<include name="build.properties"/>
<include name="env-template.properties"/>
<include name="flex-sdk-description.xml"/>
<include name="installer.xml"/>
<include name="installer.properties/**"/>
<include name="CHANGES"/>
<include name="LICENSE"/>
<include name="licenseParts/*"/>
<include name="NOTICE"/>
<include name="README"/>
<include name="RELEASE_NOTES"/>
<include name="CONTRIBUTING"/>
<include name="CONTRIBUTORS"/>
</fileset>
</copy>
<!-- bin -->
<antcall target="stage-bin"/>
<!-- frameworks -->
<antcall target="stage-frameworks"/>
<!-- tlf -->
<antcall target="stage-tlf"/>
<!-- modules -->
<antcall target="stage-modules"/>
<!-- asdoc -->
<copy todir="${basedir}/temp/asdoc" includeEmptyDirs="false">
<fileset dir="${basedir}/asdoc">
<exclude name="test/**" />
</fileset>
</copy>
<!-- ide -->
<copy todir="${basedir}/temp/ide">
<fileset dir="${basedir}/ide" >
<include name="flashbuilder/**"/>
<include name="*.sh"/>
<include name="*.bat"/>
</fileset>
</copy>
<!-- mustella (only enough to run checkintests) -->
<!-- modules -->
<antcall target="stage-mustella"/>
<!-- samples -->
<copy todir="${basedir}/temp/samples">
<fileset dir="${basedir}/samples" >
<exclude name="**/*.swc"/>
<exclude name="**/*.swf"/>
<!-- zen theme is missing assets. Don't package it
because FB will fail when it can't find the swc -->
<exclude name="themes/zen/**"/>
</fileset>
</copy>
<!-- templates -->
<copy todir="${basedir}/temp/templates">
<fileset dir="${basedir}/templates" >
<include name="automation-runtimeloading-files/**"/>
<include name="swfobject/**"/>
<exclude name="**/*.swf"/>
<exclude name="**/swfobject.js"/>
</fileset>
</copy>
<!--
Source files have Windows line endings. Most UNIX editors can handle
either type of line endings but the converse is often not true.
The bin directory is handled in stage-bin.
-->
<fixcrlf srcdir="${basedir}/temp" eol="crlf" fixlast="false">
<exclude name="bin/**"/>
<exclude name="**/assets/**"/>
<exclude name="**/*.fla"/>
<exclude name="**/*.flv"/>
<exclude name="**/*.gif"/>
<exclude name="**/*.mp3"/>
<exclude name="**/*.jpg"/>
<exclude name="**/*.pbj"/>
<exclude name="**/*.png"/>
<exclude name="**/*.sh"/>
<exclude name="**/*.swf"/>
</fixcrlf>
<!--
Unix shell scripts need the correct line endings.
The bin directory is handled in stage-bin.
-->
<fixcrlf srcdir="${basedir}/temp" eol="unix" fixlast="false">
<include name="**.sh"/>
<exclude name="bin/**"/>
</fixcrlf>
</target>
<!-- frameworks -->
<!-- javascript and test directories follow -->
<target name="stage-frameworks">
<copy todir="${basedir}/temp/frameworks" includeEmptyDirs="false">
<fileset dir="${basedir}/frameworks">
<include name="**"/>
<exclude name="**/libs/**"/>
<exclude name="**/*.swc"/>
<exclude name="**/*.pbj"/>
<exclude name="**/*.swf"/>
<exclude name="**/*.mxp"/>
<exclude name="test*/**"/>
<exclude name="javascript/**"/>
<exclude name="projects/air/**"/>
<exclude name="projects/spark/manifest.xml"/>
<exclude name="projects/*/bundles.properties"/>
<exclude name="projects/*/.settings/**"/>
</fileset>
</copy>
<!-- frameworks/javascript -->
<copy todir="${basedir}/temp/frameworks/javascript" includeEmptyDirs="false">
<fileset dir="${basedir}/frameworks/javascript">
<include name="**/**" />
<exclude name="FABridge/**/swfobject.js"/>
<exclude name="FABridge/readme.txt"/>
</fileset>
</copy>
<!-- frameworks/tests -->
<antcall target="stage-frameworks-tests"/>
<!-- Update all Version.as files in the kit frameworks directory with build.number -->
<antcall target="version-update"/>
</target>
<target name="stage-frameworks-tests" unless="no.tests">
<!-- frameworks -->
<copy todir="${basedir}/temp/frameworks" includeEmptyDirs="false">
<fileset dir="${basedir}/frameworks">
<include name="test*/**"/>
</fileset>
</copy>
</target>
<!-- tlf -->
<target name="stage-tlf">
<copy todir="${basedir}/temp/frameworks/projects/textLayout" includeEmptyDirs="false">
<fileset dir="${TLF_HOME}/textLayout">
<include name="src/**"/>
<include name="manifest.xml"/>
</fileset>
</copy>
</target>
<target name="stage-bin">
<copy todir="${basedir}/temp/bin" includeEmptyDirs="false">
<fileset dir="${basedir}/bin">
<include name="*"/>
<exclude name="adl*"/>
<exclude name="adt*"/>
</fileset>
</copy>
<fixcrlf srcdir="${basedir}/temp/bin" eol="crlf" fixlast="false">
<include name="**/*.bat"/>
</fixcrlf>
<!-- Unix shell scripts need the correct line endings. -->
<fixcrlf srcdir="${basedir}/temp/bin" eol="unix" fixlast="false">
<exclude name="**/*.bat"/>
</fixcrlf>
</target>
<target name="stage-modules" unless="no.modules">
<!-- modules -->
<copy todir="${basedir}/temp/modules" includeEmptyDirs="false">
<fileset dir="${basedir}/modules">
<include name="**"/>
<exclude name="thirdparty/**"/>
<exclude name=".metadata/**"/>
<exclude name="**/*.jar"/>
<exclude name="**/*.vms"/>
<exclude name="*/test/**"/>
<exclude name="compiler/src/java/velocity.log"/>
<exclude name="compiler/**/ParseException.java"/>
<exclude name="compiler/**/Parser.java"/>
<exclude name="compiler/**/ParserConstants.java"/>
<exclude name="compiler/**/Token.java"/>
<exclude name="compiler/**/TokenManager.java"/>
<exclude name="compiler/**/TokenMgrError.java"/>
<exclude name="**/classes/**"/>
<exclude name="**/.classpath"/>
<exclude name="**/.project"/>
</fileset>
</copy>
<!-- modules/thirdparty -->
<copy todir="${basedir}/temp/modules/thirdparty" includeEmptyDirs="true">
<fileset dir="${basedir}/modules/thirdparty">
<include name="**"/>
<exclude name="**/classes/**"/>
<exclude name="**/.classpath"/>
<exclude name="**/.project"/>
<exclude name="*/test*/**"/>
</fileset>
</copy>
</target>
<!-- mustella (only enough to run checkintests) -->
<target name="stage-mustella" unless="no.tests">
<copy todir="${basedir}/temp/mustella">
<fileset dir="${basedir}/mustella">
<include name="as3/**"/>
<exclude name="as3/src/mustella/ContinueAfterRuntimeException/**"/>
<exclude name="as3/src/mustella/ExcludeList.txt"/>
<exclude name="as3/src/mustella/IncludeList.txt"/>
<exclude name="as3/**/*.air"/>
<exclude name="as3/**/*.swf"/>
<include name="build.xml"/>
<include name="local.properties"/>
<include name="MustellaResultsParser.java"/>
</fileset>
</copy>
</target>
<target name="stage-source-pixelbender"
description="Package Pixel Bender source files required to build in zip file">
<antcall target="clean-temp"/>
<copy todir="${basedir}/temp" includeEmptyDirs="false">
<fileset dir="${basedir}">
<include name="pixelbender.xml"/>
<include name="env-template.properties"/>
</fileset>
</copy>
<copy todir="${basedir}/temp" includeEmptyDirs="false">
<fileset dir="${basedir}">
<include name="**/*.pbk"/>
<include name="frameworks/projects/framework/build.xml" />
<include name="frameworks/projects/spark/build.xml" />
<exclude name="**/mustella/**"/>
</fileset>
</copy>
<copy file="${basedir}/README.pb" tofile="${basedir}/temp/README" />
<copy file="${basedir}/licenseParts/LICENSE.pb" tofile="${basedir}/temp/LICENSE" />
<copy file="${basedir}/licenseParts/NOTICE.pb" tofile="${basedir}/temp/NOTICE" />
<echo file="${basedir}/temp/RELEASE_NOTES">
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache Flex Pixel Bender Package 1.0.0
=====================================
This package contains Adobe Pixel Bender shaders used by the Apache
Flex SDK.
See the README for instructions on compiling the shaders on Windows and
Mac. There is no compiler for Linux.
There are no known issues.
</echo>
</target>
<target name="binary-package"
description="Package binary files in zip and tar-gzip file.">
<!-- don't include modules directory in stage-source -->
<property name="no.modules" value="set" />
<!-- don't include mustella or frameworks/tests in stage-source -->
<property name="no.tests" value="set" />
<antcall target="stage-source"/>
<!--
Some, but not all framework sources are included.
Need to include the sources required for build_framework.xml.
-->
<delete dir="${basedir}/temp/frameworks" includeemptydirs="true">
<include name="build_framework.xml"/>
<include name="projects/*/.*/**"/>
<include name="projects/*/asdoc/**"/>
<include name="projects/*/bundles/*/docs/**"/>
<include name="projects/flash-integration/**"/>
<include name="projects/playerglobal/**"/>
<exclude name="projects/flash-integration/src/**"/>
<exclude name="projects/flash-integration/manifest.xml"/>
</delete>
<!-- remove some of the themes and all the src for the themes -->
<delete dir="${basedir}/temp/frameworks/themes" includeemptydirs="true">
<include name="Ice/**"/>
<include name="Institutional/**"/>
<include name="Smoke/**"/>
<include name="Wooden/**"/>
<include name="**/src/**"/>
</delete>
<!-- delete any left-over empty directories -->
<delete includeemptydirs="true">
<fileset dir="${basedir}/temp/frameworks">
<and>
<size value="0"/>
<type type="dir"/>
</and>
</fileset>
</delete>
<!-- these files are in addition to the remaining source files -->
<!-- concat the license file with the binary license file for the 3rd party deps -->
<concat destfile="${basedir}/temp/LICENSE">
<filelist dir="${FLEX_HOME}" files="LICENSE,licenseParts/LICENSE.bin"/>
</concat>
<!-- concat the license file with the binary license file for the 3rd party deps -->
<concat destfile="${basedir}/temp/NOTICE">
<filelist dir="${FLEX_HOME}" files="NOTICE,licenseParts/NOTICE.bin"/>
</concat>
<!-- use this to build frameworks -->
<copy file="${basedir}/frameworks/build_framework.xml"
tofile="${basedir}/temp/frameworks/build.xml" failonerror="true" verbose="true"/>
<!-- ant is pre-built and in FLEX_HOME/ant rather than modules/antTasks -->
<antcall target="stage-antTasks"/>
<!-- locales -->
<antcall target="stage-locales"/>
<!-- generated files in frameworks excepts libs and rsls -->
<copy todir="${basedir}/temp/frameworks">
<fileset dir="${basedir}/frameworks">
<include name="projects/*/bundles.properties"/>
<include name="projects/spark/manifest.xml"/>
<include name="**/*.pbj"/>
<include name="**/*.swc"/>
<include name="**/*.swf"/>
<exclude name="libs/**"/>
<exclude name="rsls/**"/>
<exclude name="tests/**"/>
</fileset>
</copy>
<!-- frameworks/libs -->
<copy todir="${basedir}/temp/frameworks/libs">
<fileset dir="${basedir}/frameworks/libs">
<include name="air/airframework.swc"/>
<include name="air/airspark.swc"/>
<include name="mobile/mobilecomponents.swc"/>
<include name="apache.swc"/>
<include name="authoringsupport.swc"/>
<include name="core.swc"/>
<include name="experimental.swc"/>
<include name="experimental_mobile.swc"/>
<include name="flatspark.swc"/>
<include name="spark.swc"/>
<include name="framework.swc"/>
<include name="mx/mx.swc"/>
<include name="flash-integration.swc"/>
<include name="rpc.swc"/>
<include name="sparkskins.swc"/>
<include name="authoringsupport.swc"/>
<include name="charts.swc"/>
<include name="advancedgrids.swc"/>
<include name="spark_dmv.swc"/>
<include name="textLayout.swc"/>
<exclude name="osmf.swc"/>
</fileset>
</copy>
<!-- frameworks/libs/automation -->
<copy todir="${basedir}/temp/frameworks/libs/automation">
<fileset dir="${basedir}/frameworks/libs/automation">
<include name="automation.swc"/>
<include name="automation_agent.swc"/>
<include name="automation_air.swc"/>
<include name="automation_airspark.swc"/>
<include name="automation_dmv.swc"/>
<include name="automation_flashflexkit.swc"/>
<include name="automation_spark.swc"/>
<include name="tool.swc"/>
<include name="tool_air.swc"/>
</fileset>
</copy>
<!-- frameworks/rsls -->
<copy todir="${basedir}/temp/frameworks/rsls">
<fileset dir="${basedir}/frameworks/rsls"/>
</copy>
<!-- the jar files -->
<antcall target="stage-lib"/>
<!-- locale swcs -->
<copy todir="${basedir}/temp/frameworks/locale">
<fileset dir="${basedir}/frameworks/locale">
<include name="**/*.swc"/>
</fileset>
</copy>
<!-- ide -->
<copy todir="${basedir}/temp/ide">
<fileset dir="${basedir}/ide" >
<include name="flashbuilder/config"/>
</fileset>
</copy>
<!-- sample themes -->
<copy todir="${basedir}/temp/samples">
<fileset dir="${basedir}/samples" >
<include name="**/build.xml"/>
<include name="**/*.swc"/>
<include name="**/*.swf"/>
<!-- don't package zen theme as it is missing
some assets and FB fails looking for the swc -->
<exclude name="themes/zen/**"/>
</fileset>
</copy>
<!-- swfobject templates except for downloaded files -->
<copy todir="${basedir}/temp/templates/swfobject">
<fileset dir="${basedir}/templates/swfobject">
<exclude name="**/expressInstall.swf"/>
<exclude name="**/swfobject.js"/>
</fileset>
</copy>
<!-- now that config xml files are in temp, fix them up for release. -->
<echo message="Updating config file air-config.xml with version ${build.version}"/>
<fix-config-file file="${basedir}/temp/frameworks/air-config.xml" version="${build.version}" />
<echo message="Updating config file flex-config.xml with version ${build.version}"/>
<fix-config-file file="${basedir}/temp/frameworks/flex-config.xml" version="${build.version}" />
<antcall target="binary-package-zip"/>
<antcall target="binary-package-tgz"/>
<copy todir="${basedir}/out" file="${basedir}/apache-flex-sdk-installer-config.xml" />
</target>
<target name="stage-lib">
<!--
lib - Do not include any jars which we prompted to download because of
conflicting licenses. These are all in lib/external/optional.
-->
<copy todir="${basedir}/temp/lib">
<fileset dir="${basedir}/lib">
<include name="asc.jar"/>
<include name="asdoc.jar"/>
<include name="batik-all-flex.jar"/>
<include name="compc.jar"/>
<include name="copylocale.jar"/>
<include name="digest.jar"/>
<include name="fdb.jar"/>
<include name="fcsh.jar"/>
<include name="flex-compiler-oem.jar"/>
<include name="flex-messaging-common.jar"/>
<include name="mxmlc.jar"/>
<include name="optimizer.jar"/>
<include name="swcdepends.jar"/>
<include name="swfdump.jar"/>
<include name="swfutils.jar"/>
<include name="fxgutils.jar"/>
<include name="velocity-dep-1.4-flex.jar"/>
<include name="flex-tool-api.jar"/>
<exclude name="external/optional/**"/>
</fileset>
</copy>
<!--
external libraries
We don't have the sources to build them but they have compatible licenses.
-->
<copy todir="${basedir}/temp/lib/external">
<fileset dir="${basedir}/lib/external">
<!-- required license and notice files -->
<include name="*LICENSE*/**"/>
<include name="*NOTICE*/**"/>
<include name="*README*"/>
<!-- jar files -->
<include name="commons-collections.jar"/>
<include name="commons-discovery.jar"/>
<include name="commons-logging.jar"/>
<include name="javacc.jar"/>
<include name="saxon9.jar"/>
<include name="xalan.jar"/>
<include name="xercesImpl.jar"/>
<include name="xercesPatch.jar"/>
<include name="xml-apis-ext.jar"/>
<include name="xml-apis.jar"/>
<exclude name="optional/**"/>
</fileset>
</copy>
</target>
<!--
Packages the binary distribution with ZIP.
-->
<target name="binary-package-zip" unless="no.zip"
description="Zips up the files in the temp directory into the binary zipfile.">
<mkdir dir="${basedir}/out"/>
<zip destfile="${basedir}/out/${binary.kit}.zip" basedir="${basedir}/temp"/>
</target>
<target name="binary-package-zip-pixelbender" unless="no.zip"
description="Zips up the Pixel Bender files in the temp directory into the binary zipfile.">
<mkdir dir="${basedir}/out"/>
<zip destfile="${basedir}/out/${binary-pixelbender.kit}.zip" basedir="${basedir}/temp"/>
</target>
<!--
Packages the binary distribution with TAR-GZIP.
-->
<target name="binary-package-tgz" unless="no.zip"
description="Tar-Gzip up the files in the temp directory into the binary tgz file.">
<tar-gzip name="${binary.kit}" />
</target>
<target name="binary-package-tgz-pixelbender" unless="no.zip"
description="Tar-Gzip up the files in the temp directory into the binary tgz file.">
<tar-gzip name="${binary-pixelbender.kit}" />
</target>
<target name="binary-package-pixelbender" depends="build-pixelbender"
description="Package Pixel Bender binary files in zip and tar-gzip file.">
<antcall target="stage-source-pixelbender"/>
<copy todir="${basedir}/temp">
<fileset dir="${basedir}">
<include name="**/*.pbj"/>
<exclude name="**/mustella/**"/>
</fileset>
</copy>
<antcall target="binary-package-zip-pixelbender"/>
<antcall target="binary-package-tgz-pixelbender"/>
</target>
<target name="build-pixelbender">
<ant dir="${basedir}" antfile="pixelbender.xml"/>
</target>
<macrodef name="fix-config-file">
<attribute name="file"/>
<attribute name="version"/>
<sequential>
<replace file="@{file}">
<replacefilter
token="&lt;warn-no-explicit-super-call-in-constructor&gt;true"
value="&lt;warn-no-explicit-super-call-in-constructor&gt;false"/>
<replacefilter
token="$${build.number}"
value="@{version}"/>
</replace>
</sequential>
</macrodef>
<!--
tar with gzip compression, the temp directory and put it in the out directory.
The shell scripts in the bin directory (no extension) and other .sh files have
mode set to execute.
name - the basename name of the kit in out directory, without the .tar.gz extension
-->
<macrodef name="tar-gzip">
<attribute name="name"/>
<sequential>
<mkdir dir="${basedir}/out"/>
<tar destfile="${basedir}/out/@{name}.tar.gz"
compression="gzip"
longfile="gnu">
<tarfileset dir="${basedir}/temp" prefix="@{name}">
<include name="**" />
<exclude name="bin/**" />
<exclude name="**/*.sh" />
</tarfileset>
<tarfileset dir="${basedir}/temp" prefix="@{name}">
<include name="bin/*.bat" />
</tarfileset>
<tarfileset dir="${basedir}/temp" prefix="@{name}" mode="755">
<include name="bin/*" />
<include name="**/*.sh" />
<exclude name="bin/*.bat" />
</tarfileset>
</tar>
</sequential>
</macrodef>
<!--
Update all frameworks Version.as files in the kit stagging area with the
latest version build number info.
You need to place the antelopetasks*.jar jar file in the anttask.classpath
in order to do this. If the jar isn't found, the update is skipped.
-->
<target name="version-update"
description="Update all frameworks/Version.as files">
<available property="have.greptask"
classname="ise.antelope.tasks.Find"
classpathref="anttask.classpath"/>
<antcall target="have-greptask"/>
<antcall target="no-greptask"/>
</target>
<target name="have-greptask" if="have.greptask">
<taskdef name="grep" classname="ise.antelope.tasks.Find" classpathref="anttask.classpath"/>
<echo message="Updating all frameworks/projects/**/Version.as files with version ${release.version}.${build.number.date}"/>
<!-- Update all Version.as files in the kit frameworks directory-->
<replaceregexp>
<regexp pattern='"[0-9]\.[0-9]+\.[0-9]+\.[0-9]+";'/>
<substitution expression='"${release.version}.${build.number.date}";'/>
<fileset dir="${FLEX_HOME}/temp/frameworks/projects">
<include name="**/Version.as"/>
</fileset>
</replaceregexp>
</target>
<target name="no-greptask" unless="have.greptask">
<echo message="Version files not updated."/>
<echo message="antelopetasks*.jar not found in anttask.classpath"/>
</target>
<target name="stage-locales"
description="Stage all the locale swc's built">
<copy todir="${basedir}/temp/frameworks/locale" includeEmptyDirs="false">
<fileset dir="${basedir}/frameworks/locale">
<include name="**/*.swc"/>
</fileset>
</copy>
<!-- frameworks/projects -->
<!--
Remove these files from the binary kit.
copylocale looks for bundles and then uses default locale so if there is
not a locale sub-directory don't include the bundles directory.
-->
<delete dir="${basedir}/temp/frameworks/projects" includeEmptyDirs="false">
<include name="airspark/bundles/**"/>
<include name="automation_air/bundles/**"/>
<include name="automation_dmv/bundles/**"/>
<include name="automation_flashflexkit/bundles/**"/>
<include name="automation_spark/bundles/**"/>
<include name="*/bundles/**/empty.properties"/>
<include name="*/bundles/**/docs/**"/>
<include name="*/bundles/*/*.xml"/>
<include name="*/bundles/*/packages.dita"/>
<exclude name="*/bundles/${locale}"/>
</delete>
<!-- lib -->
<!-- these are built when the compiler is built with localized.jars set -->
<copy todir="${basedir}/temp/lib">
<fileset dir="${basedir}/lib">
<include name="mxmlc_da.jar"/>
<include name="mxmlc_de.jar"/>
<include name="mxmlc_es.jar"/>
<include name="mxmlc_fi.jar"/>
<include name="mxmlc_fr.jar"/>
<include name="mxmlc_it.jar"/>
<include name="mxmlc_ja.jar"/>
<include name="mxmlc_ko.jar"/>
<include name="mxmlc_nb.jar"/>
<include name="mxmlc_nl.jar"/>
<include name="mxmlc_pt.jar"/>
<include name="mxmlc_ru.jar"/>
<include name="mxmlc_sv.jar"/>
<include name="mxmlc_zh_CN.jar"/>
<include name="mxmlc_zh_TW.jar"/>
</fileset>
</copy>
<!-- FixMe: Apache is missing all these language jars. -->
<copy todir="${basedir}/temp/lib">
<fileset dir="${basedir}/lib">
<include name="batik_da.jar"/>
<include name="batik_de.jar"/>
<include name="batik_es.jar"/>
<include name="batik_fi.jar"/>
<include name="batik_fr.jar"/>
<include name="batik_it.jar"/>
<include name="batik_ko.jar"/>
<include name="batik_ja.jar"/>
<include name="batik_nb.jar"/>
<include name="batik_nl.jar"/>
<include name="batik_pt.jar"/>
<include name="batik_ru.jar"/>
<include name="batik_sv.jar"/>
<include name="batik_zh_CN.jar"/>
<include name="batik_zh_TW.jar"/>
<include name="xercesImpl_da.jar"/>
<include name="xercesImpl_de.jar"/>
<include name="xercesImpl_es.jar"/>
<include name="xercesImpl_fi.jar"/>
<include name="xercesImpl_fr.jar"/>
<include name="xercesImpl_it.jar"/>
<include name="xercesImpl_ko.jar"/>
<include name="xercesImpl_ja.jar"/>
<include name="xercesImpl_nb.jar"/>
<include name="xercesImpl_nl.jar"/>
<include name="xercesImpl_pt.jar"/>
<include name="xercesImpl_ru.jar"/>
<include name="xercesImpl_sv.jar"/>
<include name="xercesImpl_zh_CN.jar"/>
<include name="xercesImpl_zh_TW.jar"/>
</fileset>
</copy>
</target>
<target name="ja-locale-samples" if="build.additional-packages">
<antcall target="clean-temp"/>
<!--
<copy todir="${basedir}/temp/samples_ja">
<fileset dir="${basedir}/samples/ja_JP">
<include name="README_ja.txt"/>
<include name="explorer/**"/>
</fileset>
</copy>
<mkdir dir="${basedir}/out"/>
<zip file="${basedir}/out/${kit.prefix}-locales.zip" basedir="${basedir}/temp" includes="**"/>
-->
</target>
<target name="antTasks-package" if="build.additional-packages">
<antcall target="antTasks"/>
<antcall target="clean-temp"/>
<antcall target="stage-antTasks"/>
<!-- templates -->
<copy todir="${basedir}/temp/templates">
<fileset dir="${basedir}/templates" >
<include name="**/*"/>
<exclude name="build.*"/>
<exclude name="swfobject/readme.txt"/>
<exclude name="metadata/**"/>
</fileset>
</copy>
<mkdir dir="${basedir}/out"/>
<zip file="${basedir}/out/${kit.prefix}-flexTasks.zip" basedir="${basedir}/temp"/>
<antcall target="clean-temp"/>
</target>
<target name="stage-antTasks" description="Stage antTask binaries.">
<copy file="${basedir}/modules/antTasks/build.xml-distro"
tofile="${basedir}/temp/ant/build.xml"/>
<copy file="${basedir}/modules/antTasks/README.txt"
tofile="${basedir}/temp/ant/README.txt"/>
<copy file="${basedir}/modules/antTasks/flexTasks.tasks"
todir="${basedir}/temp/ant"/>
<!-- lib -->
<copy todir="${basedir}/temp/ant/lib">
<fileset dir="${basedir}/lib" includes="flexTasks.jar"/>
</copy>
<!-- src -->
<copy todir="${basedir}/temp/ant/src">
<fileset dir="${basedir}/modules/antTasks/src/">
<include name="flex/**/*.java"/>
</fileset>
</copy>
</target>
<target name="asdoc-package" description="Package the asdocs">
<antcall target="clean-temp"/>
<antcall target="asdoc"/>
<copy todir="${basedir}/temp/asdoc">
<fileset dir="${basedir}/asdoc-output"/>
</copy>
<copy todir="${basedir}/temp/asdoc">
<fileset dir="${basedir}">
<include name="LICENSE" />
<include name="NOTICE" />
</fileset>
</copy>
<zip file="${basedir}/out/${kit.prefix}-asdocs.zip" basedir="${basedir}/temp"/>
<antcall target="clean-temp"/>
</target>
<target name="fcsh-package" depends="clean-temp" description="Zip up fcsh.zip">
<copy todir="${basedir}/temp">
<fileset dir="${basedir}/modules/compiler">
<include name="FlexCompilerShell-license.txt"/>
</fileset>
</copy>
<!-- bin -->
<copy todir="${basedir}/temp/bin">
<fileset dir="${basedir}/bin">
<include name="fcsh"/>
<include name="fcsh.exe"/>
</fileset>
</copy>
<!-- lib -->
<copy todir="${basedir}/temp/lib">
<fileset dir="${basedir}/lib">
<include name="fcsh.jar"/>
</fileset>
</copy>
<mkdir dir="${basedir}/out"/>
<zip destfile="${basedir}/out/${kit.prefix}-fcsh.zip">
<zipfileset dir="${basedir}/temp" excludes="bin/*, **/*.bat, **/*.sh, **/*.linux"/>
<zipfileset dir="${basedir}/temp" includes="bin/*, **/*.bat, **/*.sh, **/*.linux" filemode="755" />
</zip>
<antcall target="clean-temp"/>
</target>
<target name="air-installers" description="Copy AIR runtime installers from sdk/in to sdk/out">
<mkdir dir="${basedir}/out"/>
<copy todir="${basedir}/out">
<fileset file="${basedir}/in/air/mac/Adobe AIR.dmg"/>
<fileset file="${basedir}/in/air/win/Adobe AIR Installer.exe"/>
</copy>
</target>
<target name="clean-temp" unless="noclean.temp">
<delete dir="${basedir}/temp" failonerror="false" includeEmptyDirs="true"/>
</target>
<!-- Builds fat swcs. -->
<target name="doc">
<ant dir="${basedir}/frameworks" target="doc" />
</target>
<!--
Tests: The current checkintests that must be run before every checkin
-->
<target name="oldcheckintests" depends="dependencychecker-framework,checkintests-mustella" description="Run these tests before every checkin"/>
<!-- FixMe: add dependency checker and mobile tests -->
<target name="checkintests" depends="basictests-mustella" description="Run these tests before every checkin" />
<!--<target name="checkintests" depends="dependencychecker-framework,basictests-mustella,checkintests-mobile" description="Run these tests before every checkin"/-->
<target name="checkintests-mobile" depends="airmobile-basictests-mustella" description="Run these tests before every checkin to mobile SDK code"/>
<!--
Tests: Mustella checkintests
-->
<target name="checkintests-mustella" depends="mustella-setup,componentsmoke-mustella,checkinapp-mustella,sparkTest-mustella,states-mustella,layout-mustella,graphics-mustella,fxgCompileTest-mustella"/>
<target name="basictests-mustella" depends="mustella-setup,basictests"/>
<target name="airmobile-basictests-mustella" depends="mustella-setup,airmobile-basictests"/>
<target name="mustella-setup" depends="runtime-setup" description="compile mustella java file">
<ant dir="${basedir}/mustella" target="makemustellaswc">
<property name="use_mustella_framework_dir" value="false"/>
</ant>
<property name="moreCompilerArgs" value=""/>
<!-- compile the results parser -->
<javac srcdir="mustella" includes="MustellaResultsParser.java"/>
</target>
<!-- To run the checkintests as well as any mustella tests need AIR for the adl and
a flash player content debugger.
-->
<target name="check-runtime-env" depends="check-air-home"
description="Check for the required runtime environment variables for the checkintests">
<available file="${env.FLASHPLAYER_DEBUGGER}" property="FLASHPLAYER_DEBUGGER.set"/>
<fail message="FLASHPLAYER_DEBUGGER is ${env.FLASHPLAYER_DEBUGGER} which is not an Adobe Flash Player content debugger"
unless="FLASHPLAYER_DEBUGGER.set"/>
</target>
<target name="runtime-setup" depends="check-runtime-env" unless="runtime.setup"
description="Set flash.player and adl properties">
<!-- Paths to the debug standalone flashplayer. -->
<!-- (windows) path to FlashPlayerDebugger.exe -->
<!-- (mac) path to Flash Player Debugger.app/Contents/MacOS/Flash Player Debugger -->
<!-- (linux) path to flashplayerdebugger -->
<property name="flash.player" value="${env.FLASHPLAYER_DEBUGGER}"/>
<!-- Paths to the adl. -->
<condition property="adl" value="${env.AIR_HOME}/bin/adl.exe">
<os family="windows"/>
</condition>
<condition property="adl" value="${env.AIR_HOME}/bin/adl">
<os family="mac"/>
</condition>
<condition property="adl" value="${env.AIR_HOME}/bin/adl">
<os family="unix"/>
</condition>
<property name="runtime.setup" value="done"/>
</target>
<target name="load-task" depends="runtime-setup">
<!-- load the <mxmlc> task; we can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail -->
<taskdef resource="flexTasks.tasks" classpath="${basedir}/lib/flexTasks.jar"/>
</target>
<target name="basictests" depends="load-task" description="run basic tests using mustella">
<!-- compile the basic tests -->
<mxmlc fork="true"
file="${basedir}/frameworks/tests/basicTests/BasicTests.mxml">
<jvmarg line="${mxmlc.jvm.args}"/>
<library-path dir="${basedir}" append="true">
<include name="mustella/mustella.swc"/>
</library-path>
</mxmlc>
<!-- compile supporting swfs for basic tests -->
<mxmlc fork="true"
file="${basedir}/frameworks/tests/basicTests/basicLoader.as">
<jvmarg line="${mxmlc.jvm.args}"/>
</mxmlc>
<mxmlc fork="true"
file="${basedir}/frameworks/tests/basicTests/spark/views/StyleManagerModuleTest.mxml">
<jvmarg line="${mxmlc.jvm.args}"/>
</mxmlc>
<mxmlc fork="true"
file="${basedir}/frameworks/tests/basicTests/spark/views/HelloWorld.mxml"
static-rsls="false"
remove-unused-rsls="true" >
<jvmarg line="${mxmlc.jvm.args}"/>
</mxmlc>
<!-- run the component smoke -->
<echo message="launching player and swf"/>
<exec executable="${flash.player}" dir="${basedir}/frameworks" failonerror="true">
<arg value="${basedir}/frameworks/tests/basicTests/BasicTests.swf"/>
</exec>
<!-- halt if there was an error -->
<antcall target="mustellaresultsparser"/>
</target>
<target name="airmobile-basictests" depends="load-task" description="run basic tests using mustella">
<!-- compile the basic tests -->
<mxmlc fork="true"
file="${basedir}/frameworks/tests/airMobileBasicTests/src/airMobileBasicTests.mxml"
output="${basedir}/frameworks/tests/airMobileBasicTests/bin-debug/airMobileBasicTests.swf">
<jvmarg line="${mxmlc.jvm.args}"/>
<load-config filename="${basedir}/frameworks/airmobile-config.xml"/>
<library-path dir="${basedir}" append="true">
<include name="mustella/mustella.swc"/>
</library-path>
</mxmlc>
<copy file="${basedir}/frameworks/tests/airMobileBasicTests/src/airMobileBasicTests-app.xml" tofile="${basedir}/frameworks/tests/airMobileBasicTests/bin-debug/airMobileBasicTests-app.xml"/>
<!-- run the component smoke -->
<echo message="launching ADL and swf"/>
<exec executable="${adl}" dir="${basedir}/frameworks" failonerror="true">
<arg value="-profile" />
<arg value="mobileDevice" />
<arg value="-screensize" />
<arg value="SamsungGalaxyTab" />
<arg value="${basedir}/frameworks/tests/airMobileBasicTests/bin-debug/airMobileBasicTests-app.xml"/>
</exec>
<!-- halt if there was an error -->
<antcall target="mustellaresultsparser"/>
</target>
<target name="componentsmoke-mustella" depends="load-task" description="run component smoke using mustella">
<!-- compile the component smoke -->
<mxmlc fork="true"
file="${basedir}/frameworks/tests/componentSmoke/componentSmoke2.mxml">
<jvmarg line="${mxmlc.jvm.args}"/>
<includes symbol="componentSmoke_testScript"/>
<includes symbol="ExitWhenDone"/>
<includes symbol="SendFormattedResultsToLog"/>
<library-path dir="${basedir}" append="true">
<include name="mustella/mustella.swc"/>
</library-path>
<theme dir="${basedir}/frameworks/themes">
<include name="Halo/halo.swc" />
</theme>
</mxmlc>
<!-- run the component smoke -->
<echo message="launching player and swf"/>
<exec executable="${flash.player}" dir="${basedir}/frameworks" failonerror="true">
<arg value="${basedir}/frameworks/tests/componentSmoke/componentSmoke2.swf"/>
</exec>
<!-- halt if there was an error -->
<antcall target="mustellaresultsparser"/>
</target>
<target name="checkinapp-mustella" depends="load-task" description="run checkinapp using mustella">
<echo message="compiling checkinapp"/>
<!-- compile the checkinapp -->
<mxmlc fork="true"
file="${basedir}/frameworks/tests/checkinapp/checkinapp.mxml">
<arg line="-debug"/>
<jvmarg line="${mxmlc.jvm.args}"/>
<includes symbol="checkinapp_testScript"/>
<includes symbol="ExitWhenDone"/>
<includes symbol="SendFormattedResultsToLog"/>
<library-path dir="${basedir}" append="true">
<include name="mustella/mustella.swc"/>
</library-path>
<theme dir="${basedir}/frameworks/themes">
<include name="Halo/halo.swc" />
</theme>
</mxmlc>
<!-- run the component smoke -->
<echo message="launching player and swf"/>
<exec executable="${flash.player}" dir="${basedir}/frameworks">
<arg value="${basedir}/frameworks/tests/checkinapp/checkinapp.swf"/>
</exec>
<!-- halt if there was an error -->
<antcall target="mustellaresultsparser"/>
</target>
<target name="graphics-mustella" depends="load-task" description="run graphics checkinapp using mustella">
<echo message="compiling checkinapp"/>
<!-- compile the checkinapp -->
<mxmlc fork="true"
file="${basedir}/frameworks/tests/graphics/GraphicTags_checkin.mxml">
<jvmarg line="${mxmlc.jvm.args}"/>
<includes symbol="GraphicTags_checkintests"/>
<includes symbol="ExitWhenDone"/>
<includes symbol="SendFormattedResultsToLog"/>
<library-path dir="${basedir}" append="true">
<include name="mustella/mustella.swc"/>
</library-path>
</mxmlc>
<!-- run the component smoke -->
<echo message="launching player and swf"/>
<exec executable="${flash.player}" dir="${basedir}/frameworks">
<arg value="${basedir}/frameworks/tests/graphics/GraphicTags_checkin.swf"/>
</exec>
<!-- halt if there was an error -->
<antcall target="mustellaresultsparser"/>
</target>
<target name="sparkTest-mustella" depends="load-task" description="run spark test using mustella">
<echo message="compiling sparkTest"/>
<!-- compile the sparkTest -->
<mxmlc fork="true"
file="${basedir}/frameworks/tests/spark/sparkTest.mxml">
<jvmarg line="${mxmlc.jvm.args}"/>
<includes symbol="sparkTest_testScript"/>
<includes symbol="ExitWhenDone"/>
<includes symbol="SendFormattedResultsToLog"/>
<library-path dir="${basedir}" append="true">
<include name="mustella/mustella.swc"/>
</library-path>
</mxmlc>
<!-- run the component smoke -->
<echo message="launching player and swf"/>
<exec executable="${flash.player}" dir="${basedir}/frameworks">
<arg value="${basedir}/frameworks/tests/spark/sparkTest.swf"/>
</exec>
<!-- halt if there was an error -->
<antcall target="mustellaresultsparser"/>
</target>
<target name="fxgCompileTest-mustella" depends="load-task" description="run spark test using mustella">
<echo message="compiling fxgCompileTest"/>
<!-- compile the sparkTest -->
<mxmlc fork="true"
file="${basedir}/frameworks/tests/fxgCompile/fxgCompileTest.mxml">
<jvmarg line="${mxmlc.jvm.args}"/>
<includes symbol="fxgCompileTest_testScript"/>
<includes symbol="ExitWhenDone"/>
<includes symbol="SendFormattedResultsToLog"/>
<library-path dir="${basedir}" append="true">
<include name="mustella/mustella.swc"/>
</library-path>
</mxmlc>
<!-- run the component smoke -->
<echo message="launching player and swf"/>
<exec executable="${flash.player}" dir="${basedir}/frameworks">
<arg value="${basedir}/frameworks/tests/fxgCompile/fxgCompileTest.swf"/>
</exec>
<!-- halt if there was an error -->
<antcall target="mustellaresultsparser"/>
</target>
<target name="states-mustella" description="run states test using mustella">
<ant antfile="${basedir}/frameworks/tests/states/build.xml" dir="${basedir}/frameworks/tests/states"/>
</target>
<target name="layout-mustella" description="run layout test using mustella">
<ant antfile="${basedir}/frameworks/tests/layout/build.xml" dir="${basedir}/frameworks/tests/layout"/>
</target>
<target name="mustellaresultsparser">
<java classname="mustella.MustellaResultsParser" failonerror="true">
<sysproperty key="APPDATA" value="${env.APPDATA}"/>
<classpath>
<pathelement location="${basedir}"/>
</classpath>
</java>
</target>
<!--
ASC tests:
runtests.py tested on mac & windows...not sure about linux
-->
<target name="asc-tests" description="Run these tests if you are committing changes to ASC">
<pathconvert property="base" dirsep="/">
<path path="${basedir}"/>
</pathconvert>
<condition property="avm.path" value="${base}/modules/asc/bin/windows/avmplus_s.exe">
<os family="windows"/>
</condition>
<condition property="avm.path" value="${base}/modules/asc/bin/mac/shell_s">
<os family="mac"/>
</condition>
<condition property="avm.path" value="${base}/modules/asc/bin/linux/avmplus_s">
<and>
<os family="unix"/>
<not> <os family="mac"/> </not>
</and>
</condition>
<delete>
<fileset dir="${base}/modules/asc/test/compiler">
<include name="*.html"/>
<include name="result.properties"/>
<include name="asc.out.log"/>
</fileset>
</delete>
<exec executable="python" dir="${base}/modules/asc/test/compiler" output="${base}/modules/asc/test/compiler/asc.out.log">
<arg value="runtests.py"/>
<arg value="--asc"/>
<arg value="${base}/lib/asc.jar"/>
<arg value="--globalabc"/>
<arg value="${base}/modules/asc/abc/builtin.abc"/>
<arg value="--playerglobalabc"/>
<arg value="${base}/modules/asc/abc/playerglobal.abc"/>
<arg value="--toplevelabc"/>
<arg value="${base}/modules/asc/abc/toplevel.abc"/>
<arg value="--avm"/>
<arg value="${avm.path}"/>
</exec>
<property file="${base}/modules/asc/test/compiler/result.properties"/>
<fail>
<condition>
<isset property="failures"/>
</condition>
</fail>
</target>
<target name="clean-dependencychecker" description="Clean up the generated java files from dependency checker">
<!-- not currently in Apache Flex -->
<!--
<delete>
<fileset dir="${basedir}/tools/dependencychecker" includes="**/*.class"/>
</delete>
-->
</target>
<target name="setup-dependencychecker" description="Compile dependency checker java files" depends="clean-dependencychecker">
<javac srcdir="${basedir}/tools/dependencychecker"/>
</target>
<target name="dependencychecker-framework" description="Run dependency checker on framework.swc" depends="setup-dependencychecker">
<!-- need fork b/c running java from another dir -->
<java dir="${basedir}/tools/dependencychecker" fork="true" classname="flex.tools.dependencychecker.DependencyChecker" failonerror="true">
<classpath>
<pathelement location="${basedir}/tools/dependencychecker"/>
</classpath>
<arg value="${basedir}/frameworks/libs/framework.swc" />
<arg value="frameworkSwcExceptionsList.txt"/>
</java>
</target>
<!--
Run the Apache Rat audit tool against the source in the source kit.
The report is written to rat.report.
To check a subset of files run with -Drat.dir=<dir>.
You need to place apache-rat-tasks-0.8.jar and apache-rat-0.8.jar in the
anttask.classpath in order to do this. If the jar isn't found, the report
will not be generated.
-->
<target name="rat-check" depends="rat-taskdef" if="have.rattasks"
description="Report on licenses in source kit.">
<property name="rat.dir" value="${basedir}/temp"/>
<antcall target="rat-unzip" />
<property name="rat.report" value="${basedir}/rat.report"/>
<echo message="Checking files at ${rat.dir}, report is ${rat.report}"/>
<rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportFile="${rat.report}">
<fileset dir="${rat.dir}">
<!-- Start of binary files -->
<!-- exclude Flash Professional file used for integration with Flash Professional -->
<exclude name="frameworks/projects/flash-integration/FLA/ContentHolder.fla"/>
<!-- exclude font embedded in asdoc example -->
<exclude name="frameworks/projects/framework/asdoc/en_US/mx/effects/examples/assets/OpenSans-Regular.ttf"/>
<!-- exclude media (png, gif, jpg, mp3, flv) -->
<exclude name="**/*.png"/>
<exclude name="**/*.gif"/>
<exclude name="**/*.jpg"/>
<exclude name="**/*.mp3"/>
<exclude name="**/*.flv"/>
<!-- exclude batik icon -->
<exclude name="modules/thirdparty/batik/sources/*.icns"/>
<!-- End of binary files -->
<!-- exclude batik manifests -->
<exclude name="modules/thirdparty/batik/sources/*.mf"/>
<!-- exclude text files -->
<exclude name="CONTRIBUTING"/>
<exclude name="CONTRIBUTORS"/>
<exclude name="licenseParts/*"/>
<exclude name="modules/thirdparty/batik/lib/**/LICENSE*.txt"/>
<exclude name="modules/thirdparty/batik/lib/**/README*.txt"/>
<exclude name="frameworks/projects/flatspark/src/flatspark/assets/fonts/**/OFL.txt"/>
<!-- exclude w3c sources -->
<exclude name="modules/thirdparty/batik/resources/org/apache/flex/forks/batik/dom/svg/resources/*.mod"/>
<exclude name="modules/thirdparty/batik/resources/org/apache/flex/forks/batik/dom/svg/resources/*.dtd"/>
<exclude name="modules/thirdparty/batik/sources/org/w3c/css/sac/LexicalUnit.java"/>
<exclude name="modules/thirdparty/batik/sources/org/w3c/flex/forks/css/sac/*.java"/>
<exclude name="modules/thirdparty/batik/sources/org/w3c/flex/forks/css/sac/helpers/ParserFactory.java"/>
<!-- exclude config files -->
<exclude name="modules/thirdparty/batik/svn-revision"/>
<exclude name="modules/thirdparty/xerces-patch/src/java/META-INF/services/javax.xml.parsers.SAXParserFactory"/>
<exclude name="modules/thirdparty/xerces-patch/src/java/META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration"/>
<exclude name="modules/thirdparty/xerces-patch/src/java/org/apache/xerces/jaxp/javax.xml.parsers.SAXParserFactory"/>
</fileset>
</rat:report>
</target>
<target name="rat-unzip" unless="no.zip">
<antcall target="clean-temp" />
<unzip src="${basedir}/out/${source.kit}.zip" dest="${rat.dir}"/>
</target>
<target name="rat-taskdef" description="Rat taskdef">
<available property="have.rattasks"
resource="org/apache/rat/anttasks/antlib.xml"
classpathref="anttask.classpath"/>
<antcall target="have-rattasks"/>
<antcall target="no-rattasks"/>
</target>
<target name="have-rattasks" if="have.rattasks">
<typedef resource="org/apache/rat/anttasks/antlib.xml"
uri="antlib:org.apache.rat.anttasks"
classpathref="anttask.classpath"/>
</target>
<target name="no-rattasks" unless="have.rattasks">
<echo message="Rat report not generated."/>
<echo message="rat jars (apache-rat-*.jar, apache-rat-tasks-*.jar)"/>
<echo message="not found in anttask.classpath"/>
</target>
<target name="rat-check-mustella" depends="rat-taskdef" if="have.rattasks"
description="Report on licenses in mustella directory.">
<ant dir="${basedir}/mustella" target="clean"/>
<property name="rat.mustella.dir" value="${basedir}/mustella"/>
<property name="rat.mustella.report" value="rat.mustella.report"/>
<echo message="Checking files at ${rat.mustella.dir}, report is ${basedir}/${rat.mustella.report}"/>
<rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
reportFile="${basedir}/${rat.mustella.report}">
<fileset dir="${rat.mustella.dir}">
<!-- Start of binary files -->
<!-- exclude media (png, gif, jpg, mp3, flv) -->
<exclude name="assets/**"/>
<exclude name="tests/**/*.png"/>
<exclude name="tests/**/*.gif"/>
<exclude name="tests/**/*.jpg"/>
<exclude name="tests/**/*.mp3"/>
<exclude name="tests/**/*.flv"/>
<!-- End of binary files -->
<exclude name="tests/**/*.compile"/>
</fileset>
</rat:report>
</target>
<target name="create-md5" >
<echo message="Generating MD5 hashes for release artifacts"/>
<checksum algorithm="md5" file="${basedir}/out/${binary.kit}.tar.gz" forceOverwrite="yes"/>
<checksum algorithm="md5" file="${basedir}/out/${binary.kit}.zip" forceOverwrite="yes"/>
<checksum algorithm="md5" file="${basedir}/out/${source.kit}.tar.gz" forceOverwrite="yes"/>
<checksum algorithm="md5" file="${basedir}/out/${source.kit}.zip" forceOverwrite="yes"/>
</target>
<target name="sign" >
<exec executable="gpg">
<arg value="--armor" />
<arg value="--output" />
<arg value="${basedir}/out/${source.kit}.zip.asc" />
<arg value="--detach-sig" />
<arg value="${basedir}/out/${source.kit}.zip" />
</exec>
<exec executable="gpg">
<arg value="--armor" />
<arg value="--output" />
<arg value="${basedir}/out/${source.kit}.tar.gz.asc" />
<arg value="--detach-sig" />
<arg value="${basedir}/out/${source.kit}.tar.gz" />
</exec>
<exec executable="gpg">
<arg value="--armor" />
<arg value="--output" />
<arg value="${basedir}/out/${binary.kit}.zip.asc" />
<arg value="--detach-sig" />
<arg value="${basedir}/out/${binary.kit}.zip" />
</exec>
<exec executable="gpg">
<arg value="--armor" />
<arg value="--output" />
<arg value="${basedir}/out/${binary.kit}.tar.gz.asc" />
<arg value="--detach-sig" />
<arg value="${basedir}/out/${binary.kit}.tar.gz" />
</exec>
</target>
<target name="doc-create-md5" >
<echo message="Generating MD5 hashes for doc artifacts"/>
<checksum algorithm="md5" file="${basedir}/out/${kit.prefix}-asdocs.zip" forceOverwrite="yes"/>
</target>
<target name="doc-sign" >
<exec executable="gpg">
<arg value="--armor" />
<arg value="--output" />
<arg value="${basedir}/out/${kit.prefix}-asdocs.zip.asc" />
<arg value="--detach-sig" />
<arg value="${basedir}/out/${kit.prefix}-asdocs.zip" />
</exec>
</target>
<target name="create-md5-pixelbender" >
<echo message="Generating MD5 hashes for release artifacts"/>
<checksum algorithm="md5" file="${basedir}/out/${binary-pixelbender.kit}.tar.gz" forceOverwrite="yes"/>
<checksum algorithm="md5" file="${basedir}/out/${binary-pixelbender.kit}.zip" forceOverwrite="yes"/>
<checksum algorithm="md5" file="${basedir}/out/${source-pixelbender.kit}.tar.gz" forceOverwrite="yes"/>
<checksum algorithm="md5" file="${basedir}/out/${source-pixelbender.kit}.zip" forceOverwrite="yes"/>
</target>
<target name="archive-pbj">
<echo message="Creating an archive of the compiled Pixel Bender files" />
<echo message="The compiled Pixel Bender files are taken from '${env.PIXELBENDER_COMPILED_HOME}'" />
<tar destfile="${basedir}/out/pb.tar">
<tarfileset dir="${env.PIXELBENDER_COMPILED_HOME}">
<include name="frameworks/projects/spark/asdoc/en_US/spark/effects/examples/assets/twist.pbj"/>
<include name="frameworks/projects/spark/src/spark/effects/CrossFade.pbj"/>
<include name="frameworks/projects/spark/src/spark/effects/WipeDown.pbj"/>
<include name="frameworks/projects/spark/src/spark/effects/WipeUp.pbj"/>
<include name="frameworks/projects/spark/src/spark/effects/WipeLeft.pbj"/>
<include name="frameworks/projects/spark/src/spark/effects/WipeRight.pbj"/>
<include name="frameworks/projects/framework/src/mx/graphics/shaderClasses/Color.pbj"/>
<include name="frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorBurn.pbj"/>
<include name="frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodge.pbj"/>
<include name="frameworks/projects/framework/src/mx/graphics/shaderClasses/Exclusion.pbj"/>
<include name="frameworks/projects/framework/src/mx/graphics/shaderClasses/Hue.pbj"/>
<include name="frameworks/projects/framework/src/mx/graphics/shaderClasses/Luminosity.pbj"/>
<include name="frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskFilter.pbj"/>
<include name="frameworks/projects/framework/src/mx/graphics/shaderClasses/Saturation.pbj"/>
<include name="frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLight.pbj"/>
</tarfileset>
</tar>
<gzip destfile="${basedir}/out/pb.tar.gz" src="${basedir}/out/pb.tar"/>
<delete file="${basedir}/out/pb.tar" failonerror="false" />
</target>
<!--
Run the Apache Rat audit tool against a directory without filters.
The report is written to rat.report.
Specify the folder to scan with -Drat.dir=<dir>.
You need to place apache-rat-tasks-0.8.jar and apache-rat-0.8.jar in the
anttask.classpath in order to do this. If the jar isn't found, the report
will not be generated.
-->
<target name="rat-dir" depends="rat-taskdef" if="have.rattasks"
description="Report on licenses in a folder">
<fail message="rat.dir not specified">
<condition>
<not>
<isset property="rat.dir"/>
</not>
</condition>
</fail>
<property name="rat.report" value="${basedir}/rat.report"/>
<echo message="Checking files at ${rat.dir}, report is ${rat.report}"/>
<rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportFile="${rat.report}">
<fileset dir="${rat.dir}">
</fileset>
</rat:report>
</target>
<!-- displays the md5 of a file specified via -Dfile=<file -->
<target name="md5" >
<checksum file="${file}" property="mymd5" />
<echo>${mymd5}</echo>
</target>
<!--
Run FlexUnit tests
-->
<target name="test" description="Run all framework projects' FlexUnit tests">
<ant dir="${basedir}/frameworks" target="test"/>
</target>
</project>