blob: c902ec519033aa3513151c9caa400df93ee9d7e1 [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.
-->
<!-- Note:
If you modify this file you may have to make the same change in build_framework.xml.
build_framework.xml is renamed to build.xml when it is packaged.
It is used to build the frameworks directory from the zip file.
-->
<project name="frameworks" default="main" basedir=".">
<property name="FLEX_HOME" location=".."/>
<!-- 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="mac"/>
<matches pattern="1.6.*" string="${java.version}"/>
<equals arg1="${sun.arch.data.model}" arg2="64"/>
<equals arg1="${os.arch}" arg2="x86_64"/>
</and>
</condition>
<!-- Property for the platform. -->
<condition property="isMac">
<os family="mac"/>
</condition>
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isLinux">
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<property file="${FLEX_HOME}/env.properties"/>
<property environment="env"/>
<property file="${FLEX_HOME}/build.properties"/>
<target name="main" depends="check-compile-env,check-tlf-home,clean,prepare,compile,javascript"
description="Clean build of all SWCs"/>
<target name="check-compile-env" description="Check for the required environment variables">
<ant antfile="${FLEX_HOME}/build.xml" target="check-compile-env" dir="${FLEX_HOME}"/>
</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="prepare" depends="local-fonts-snapshot, thirdparty-downloads"/>
<!--
Font snapshot files for the JREFontManager.
For some fonts it is possible to determine if it is illegal to embed them.
If that information is known for a particular font, a warning message can be
displayed.if an attempt is made to embed that font.
-->
<target name="local-fonts-snapshot"
description="Files required by FlashBuilder but not by Flex.">
<touch file="localFonts.ser"/>
<touch file="macFonts.ser"/>
<touch file="winFonts.ser"/>
</target>
<target name="thirdparty-downloads" unless="no.thirdparty-downloads" description="Downloads all the required thirdparty code.">
<ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>
</target>
<!-- Note:
Removed osmf from build. For now, just use the downloaded swc.
We can move the osmf source from osmf-download to projects/osmf and add back the
property files for all the languages if we choose.
Should consider updating the OSMF and TLF versions in use.
-->
<target name="compile" description="Builds all SWCs but not their resource bundles" depends="flex-config">
<antcall target="framework"/>
<antcall target="mx"/>
<antcall target="textLayout"/>
<antcall target="rpc"/>
<antcall target="charts"/>
<antcall target="advancedgrids"/>
<antcall target="spark"/>
<antcall target="sparkskins"/>
<antcall target="spark_dmv"/>
<antcall target="airframework"/>
<antcall target="airspark"/>
<antcall target="mobilecomponents"/>
<antcall target="mobiletheme"/>
<antcall target="core"/>
<antcall target="flash_integration"/>
<antcall target="authoringsupport"/>
<antcall target="halo"/>
<antcall target="wireframe"/>
<antcall target="aeongraphical"/>
<antcall target="apache"/>
<antcall target="experimental"/>
<antcall target="experimental_mobile"/>
<antcall target="compile-automation"/>
<antcall target="flatspark"/>
</target>
<target name="test" description="Runs the tests for all projects that have FlexUnit tests">
<delete dir="${FLEX_HOME}/test-reports"/>
<antcall target="apache-test"/>
<antcall target="spark-test"/>
<antcall target="advancedgrids-test"/>
<antcall target="framework-test"/>
</target>
<target name="flex-config" depends="playerglobal-setswfversion" description="Copy the flex/air/airmobile config templates to flex/air/airmobile-config.xml and inject version numbers">
<copy file="${basedir}/flex-config-template.xml" tofile="${basedir}/flex-config.xml" overwrite="true">
<filterset>
<filter token="playerversion" value="${playerglobal.version}"/>
<filter token="swfversion" value="${playerglobal.swfversion}"/>
<filter token="locale" value="${locale}"/>
</filterset>
</copy>
<copy file="${basedir}/air-config-template.xml" tofile="${basedir}/air-config.xml" overwrite="true">
<filterset>
<filter token="playerversion" value="${playerglobal.version}"/>
<filter token="swfversion" value="${playerglobal.swfversion}"/>
<filter token="locale" value="${locale}"/>
</filterset>
</copy>
<copy file="${basedir}/airmobile-config-template.xml" tofile="${basedir}/airmobile-config.xml" overwrite="true">
<filterset>
<filter token="playerversion" value="${playerglobal.version}"/>
<filter token="swfversion" value="${playerglobal.swfversion}"/>
<filter token="locale" value="${locale}"/>
</filterset>
</copy>
</target>
<target name="playerglobal-setswfversion" description="Set the swfversion to insert into the flex config file">
<condition property="playerglobal.swfversion" value="11">
<equals arg1="${playerglobal.version}" arg2="10.2" />
</condition>
<condition property="playerglobal.swfversion" value="12">
<equals arg1="${playerglobal.version}" arg2="10.3" />
</condition>
<condition property="playerglobal.swfversion" value="13">
<equals arg1="${playerglobal.version}" arg2="11.0" />
</condition>
<condition property="playerglobal.swfversion" value="14">
<equals arg1="${playerglobal.version}" arg2="11.1" />
</condition>
<condition property="playerglobal.swfversion" value="15">
<equals arg1="${playerglobal.version}" arg2="11.2" />
</condition>
<condition property="playerglobal.swfversion" value="16">
<equals arg1="${playerglobal.version}" arg2="11.3" />
</condition>
<condition property="playerglobal.swfversion" value="17">
<equals arg1="${playerglobal.version}" arg2="11.4" />
</condition>
<condition property="playerglobal.swfversion" value="18">
<equals arg1="${playerglobal.version}" arg2="11.5" />
</condition>
<condition property="playerglobal.swfversion" value="19">
<equals arg1="${playerglobal.version}" arg2="11.6" />
</condition>
<condition property="playerglobal.swfversion" value="20">
<equals arg1="${playerglobal.version}" arg2="11.7" />
</condition>
<condition property="playerglobal.swfversion" value="21">
<equals arg1="${playerglobal.version}" arg2="11.8" />
</condition>
<condition property="playerglobal.swfversion" value="22">
<equals arg1="${playerglobal.version}" arg2="11.9" />
</condition>
<condition property="playerglobal.swfversion" value="23">
<equals arg1="${playerglobal.version}" arg2="12.0" />
</condition>
<condition property="playerglobal.swfversion" value="24">
<equals arg1="${playerglobal.version}" arg2="13.0" />
</condition>
<condition property="playerglobal.swfversion" value="25">
<equals arg1="${playerglobal.version}" arg2="14.0" />
</condition>
<condition property="playerglobal.swfversion" value="26">
<equals arg1="${playerglobal.version}" arg2="15.0" />
</condition>
<condition property="playerglobal.swfversion" value="27">
<equals arg1="${playerglobal.version}" arg2="16.0" />
</condition>
<condition property="playerglobal.swfversion" value="28">
<equals arg1="${playerglobal.version}" arg2="17.0" />
</condition>
<condition property="playerglobal.swfversion" value="29">
<equals arg1="${playerglobal.version}" arg2="18.0" />
</condition>
<condition property="playerglobal.swfversion" value="30">
<equals arg1="${playerglobal.version}" arg2="19.0" />
</condition>
<condition property="playerglobal.swfversion" value="31">
<equals arg1="${playerglobal.version}" arg2="20.0" />
</condition>
</target>
<!--
automation: tool was formerly qtp and tool_air was formerly qtp_air
-->
<target name="compile-automation" description="Builds all automation SWCs but not their resource bundles">
<antcall target="automation_agent"/>
<antcall target="automation_dmv"/>
<antcall target="tool"/>
<antcall target="automation"/>
<antcall target="tool_air"/>
<antcall target="automation_spark"/>
<antcall target="automation_flashflexkit"/>
<antcall target="automation_air"/>
<antcall target="automation_airspark"/>
</target>
<target name="other.locales" description ="Builds resource SWCs for all locales">
<ant dir="${basedir}/projects/framework" target="other.locales"/>
<ant dir="${basedir}/projects/mx" target="other.locales"/>
<ant dir="${basedir}/projects/textLayout" target="other.locales"/>
<ant dir="${basedir}/projects/airframework" target="other.locales"/>
<ant dir="${basedir}/projects/airspark" target="other.locales"/>
<ant dir="${basedir}/projects/rpc" target="other.locales"/>
<ant dir="${basedir}/projects/charts" target="other.locales"/>
<ant dir="${basedir}/projects/advancedgrids" target="other.locales"/>
<ant dir="${basedir}/projects/spark" target="other.locales"/>
<ant dir="${basedir}/projects/mobilecomponents" target="other.locales" />
<ant dir="${basedir}/projects/playerglobal" target="other.locales" />
<ant dir="${basedir}/projects/flash-integration" target="other.locales"/>
<ant dir="${basedir}/projects/automation" target="other.locales"/>
<ant dir="${basedir}/projects/automation_agent" target="other.locales"/>
<ant dir="${basedir}/projects/tool" target="other.locales"/>
<ant dir="${basedir}/projects/tool_air" target="other.locales"/>
<ant dir="${basedir}/projects/apache" target="other.locales"/>
<ant dir="${basedir}/projects/experimental" target="other.locales"/>
<ant dir="${basedir}/projects/experimental_mobile" target="other.locales"/>
</target>
<target name="doc" >
<ant dir="${basedir}/projects/framework" target="doc" />
<ant dir="${basedir}/projects/mx" target="doc" />
<ant dir="${basedir}/projects/textLayout" target="doc" />
<ant dir="${basedir}/projects/rpc" target="doc" />
<ant dir="${basedir}/projects/charts" target="doc" />
<ant dir="${basedir}/projects/advancedgrids" target="doc" />
<ant dir="${basedir}/projects/spark" target="doc" />
<ant dir="${basedir}/projects/spark_dmv" target="doc" />
<ant dir="${basedir}/projects/sparkskins" target="doc" />
<ant dir="${basedir}/projects/airframework" target="doc" />
<ant dir="${basedir}/projects/airspark" target="doc" />
<ant dir="${basedir}/projects/mobilecomponents" target="doc" />
<ant dir="${basedir}/projects/mobiletheme" target="doc" />
<ant dir="${basedir}/projects/core" target="doc" />
<ant dir="${basedir}/projects/authoringsupport" target="doc" />
<ant dir="${basedir}/projects/wireframe" target="doc" />
<ant dir="${basedir}/projects/flash-integration" target="doc" />
<!-- removed until sources donated to Apache -->
<!--
<ant dir="${basedir}/projects/automation" target="doc" />
-->
<ant dir="${basedir}/projects/apache" target="doc" />
<ant dir="${basedir}/projects/experimental" target="doc" />
<ant dir="${basedir}/projects/experimental_mobile" target="doc" />
<!-- ant dir="${basedir}/projects/flatspark" target="doc" / -->
</target>
<!--
Cleanup
-->
<target name="super-clean" depends="thirdparty-clean,clean" description="Cleans everything including thirdparty downloads."/>
<target name="thirdparty-clean" unless="no.thirdparty-clean" description="Removes all thirdparty downloads.">
<ant antfile="${basedir}/downloads.xml" target="clean" dir="${basedir}"/>
</target>
<target name="clean" depends="check-tlf-home,automation-clean,airsdk-clean" description="Cleans all SWCs and their resource bundles">
<delete file="${basedir}/flex-config.xml"/>
<delete file="${basedir}/air-config.xml"/>
<delete file="${basedir}/airmobile-config.xml"/>
<!-- Delete output from SWC projects -->
<ant dir="${basedir}/projects/textLayout" target="clean"/>
<ant dir="${basedir}/projects/framework" target="clean"/>
<ant dir="${basedir}/projects/mx" target="clean"/>
<ant dir="${basedir}/projects/airframework" target="clean"/>
<ant dir="${basedir}/projects/airspark" target="clean"/>
<ant dir="${basedir}/projects/mobilecomponents" target="clean"/>
<ant dir="${basedir}/projects/mobiletheme" target="clean"/>
<ant dir="${basedir}/projects/core" target="clean"/>
<ant dir="${basedir}/projects/spark" target="clean"/>
<ant dir="${basedir}/projects/spark_dmv" target="clean"/>
<ant dir="${basedir}/projects/sparkskins" target="clean"/>
<ant dir="${basedir}/projects/halo" target="clean"/>
<ant dir="${basedir}/projects/wireframe" target="clean"/>
<ant dir="${basedir}/projects/flash-integration" target="clean"/>
<ant dir="${basedir}/projects/rpc" target="clean"/>
<ant dir="${basedir}/projects/authoringsupport" target="clean"/>
<ant dir="${basedir}/projects/charts" target="clean"/>
<ant dir="${basedir}/projects/advancedgrids" target="clean"/>
<ant dir="${basedir}/projects/apache" target="clean"/>
<ant dir="${basedir}/projects/experimental" target="clean"/>
<ant dir="${basedir}/projects/experimental_mobile" target="clean"/>
<ant dir="${basedir}/projects/flatspark" target="clean"/>
<ant dir="${basedir}/javascript" target="clean"/>
<ant dir="${basedir}/themes/AeonGraphical" target="clean"/>
<!-- delete the FlashBuilder executable directories -->
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${basedir}/projects">
<include name="*/bin/**"/>
</fileset>
</delete>
<!-- Delete empty folders -->
<delete dir="${basedir}/libs"/>
<delete dir="${basedir}/locale">
<exclude name="**/metadata.properties"/>
</delete>
<delete dir="${basedir}/libs/generated"/>
<!-- Delete only if it exists and it is empty. air and swfobject put dirs here. -->
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${FLEX_HOME}/templates" excludes="**/*" />
</delete>
<!-- remove these if/when they actually have content -->
<delete file="localFonts.ser"/>
<delete file="macFonts.ser"/>
<delete file="winFonts.ser"/>
</target>
<target name="automation-clean" description="Builds all automation SWCs but not their resource bundles">
<ant dir="${basedir}/projects/automation_agent" target="clean"/>
<ant dir="${basedir}/projects/automation" target="clean"/>
<ant dir="${basedir}/projects/automation_air" target="clean"/>
<ant dir="${basedir}/projects/automation_dmv" target="clean"/>
<ant dir="${basedir}/projects/automation_flashflexkit" target="clean"/>
<ant dir="${basedir}/projects/automation_spark" target="clean"/>
<ant dir="${basedir}/projects/automation_airspark" target="clean"/>
<ant dir="${basedir}/projects/tool" target="clean"/>
<ant dir="${basedir}/projects/tool_air" target="clean"/>
</target>
<target name="airsdk-clean" description="Delete files copied from the AIR SDK">
<!-- Delete AIR files and directories from 'prepare' target -->
<delete file="${FLEX_HOME}/AIR SDK license.pdf"/>
<delete file="${FLEX_HOME}/AIR SDK Readme.txt"/>
<delete file="${FLEX_HOME}/bin/adl"/>
<delete file="${FLEX_HOME}/bin/adl.exe"/>
<delete file="${FLEX_HOME}/bin/adt"/>
<delete file="${FLEX_HOME}/bin/adt.bat"/>
<delete dir="${FLEX_HOME}/include"/>
<delete dir="${FLEX_HOME}/install"/>
<delete dir="${FLEX_HOME}/frameworks/libs/air"/>
<delete dir="${FLEX_HOME}/frameworks/projects/air"/>
<delete file="${FLEX_HOME}/lib/adt.jar"/>
<delete file="${FLEX_HOME}/lib/win/FlashRuntimeExtensions.lib"/>
<delete dir="${FLEX_HOME}/runtimes"/>
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${FLEX_HOME}/samples">
<include name="badge/**" />
<include name="descriptor-sample.xml" />
<include name="icons/**" />
</fileset>
</delete>
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${FLEX_HOME}/templates">
<include name="sdk/**" />
<include name="air/**" />
<include name="extensions/**" />
</fileset>
</delete>
</target>
<target name="airframework" description="Clean build of airframework.swc">
<ant dir="${basedir}/projects/airframework"/>
</target>
<target name="airspark" description="Clean build of airspark.swc">
<ant dir="${basedir}/projects/airspark"/>
</target>
<target name="mobilecomponents" description="Clean build of mobilecomponents.swc">
<ant dir="${basedir}/projects/mobilecomponents"/>
</target>
<target name="mobiletheme" description="Clean build of mobile.swc">
<ant dir="${basedir}/projects/mobiletheme"/>
</target>
<target name="charts" description="Clean build of charts.swc">
<ant dir="${basedir}/projects/charts"/>
</target>
<target name="advancedgrids" description="Clean build of advancedgrids.swc">
<ant dir="${basedir}/projects/advancedgrids"/>
</target>
<target name="core" description="Clean build of core.swc">
<ant dir="${basedir}/projects/core"/>
</target>
<target name="framework" description="Clean build of framework.swc and its resource bundles">
<ant dir="${basedir}/projects/framework"/>
</target>
<target name="halo" description="Clean build of halo.swc">
<ant dir="${basedir}/projects/halo"/>
</target>
<target name="mx" description="Clean build of mx.swc and its resource bundles">
<ant dir="${basedir}/projects/mx"/>
</target>
<target name="spark" description="Clean build of spark.swc">
<ant dir="${basedir}/projects/spark"/>
</target>
<target name="sparkskins" description="Clean build of sparkskins.swc">
<ant dir="${basedir}/projects/sparkskins"/>
</target>
<target name="spark_dmv" description="Clean build of sparkskins.swc">
<ant dir="${basedir}/projects/spark_dmv"/>
</target>
<target name="wireframe" description="Clean build of wireframe.swc">
<ant dir="${basedir}/projects/wireframe"/>
</target>
<target name="aeongraphical" description="Clean build of aeongraphical.swf">
<ant dir="${basedir}/themes/AeonGraphical"/>
</target>
<target name="flash_integration" description="Clean build of FlexComponentBase.swc">
<ant dir="${basedir}/projects/flash-integration"/>
</target>
<target name="osmf" description="Clean build of osmf.swc">
<ant dir="${basedir}/projects/osmf"/>
</target>
<target name="rpc" description="Clean build of rpc.swc">
<ant dir="${basedir}/projects/rpc"/>
</target>
<target name="textLayout" description="Clean build of textLayout.swc">
<ant dir="${basedir}/projects/textLayout"/>
</target>
<target name="authoringsupport" description="Clean build of authoringsupport.swc">
<ant dir="${basedir}/projects/authoringsupport"/>
</target>
<target name="javascript" description="Clean build of javascript examples">
<ant dir="${basedir}/javascript"/>
</target>
<target name="automation" description="Clean build of automation swc">
<ant dir="${basedir}/projects/automation"/>
</target>
<target name="automation_air" description="Clean build of automation_air swc">
<ant dir="${basedir}/projects/automation_air"/>
</target>
<target name="automation_dmv" description="Clean build of automation_dmv swc">
<ant dir="${basedir}/projects/automation_dmv"/>
</target>
<target name="automation_flashflexkit" description="Clean build of automation_flashflexkit swc">
<ant dir="${basedir}/projects/automation_flashflexkit"/>
</target>
<target name="automation_spark" description="Clean build of automation_spark swc">
<ant dir="${basedir}/projects/automation_spark"/>
</target>
<target name="automation_airspark" description="Clean build of automation_airspark swc">
<ant dir="${basedir}/projects/automation_airspark"/>
</target>
<target name="automation_agent" description="Clean build of automation_agent swc">
<ant dir="${basedir}/projects/automation_agent"/>
</target>
<target name="tool" description="Clean build of tool swc">
<ant dir="${basedir}/projects/tool"/>
</target>
<target name="tool_air" description="Clean build of tool_air swc">
<ant dir="${basedir}/projects/tool_air"/>
</target>
<target name="apache" description="Clean build of apache.swc">
<ant dir="${basedir}/projects/apache"/>
</target>
<target name="apache-test" description="Tests for 'apache' project">
<ant dir="${basedir}/projects/apache" target="test"/>
</target>
<target name="spark-test" description="Tests for 'spark' project">
<ant dir="${basedir}/projects/spark" target="test"/>
</target>
<target name="advancedgrids-test" description="Tests for 'advancedgrids' project">
<ant dir="${basedir}/projects/advancedgrids" target="test"/>
</target>
<target name="framework-test" description="Tests for 'framework' project">
<ant dir="${basedir}/projects/framework" target="test"/>
</target>
<target name="experimental" description="Clean build of experimental.swc">
<ant dir="${basedir}/projects/experimental"/>
</target>
<target name="experimental_mobile" description="Clean build of experimental_mobile.swc">
<ant dir="${basedir}/projects/experimental_mobile"/>
</target>
<target name="flatspark" description="Clean build of flatspark.swc">
<ant dir="${basedir}/projects/flatspark"/>
</target>
</project>