blob: f33063327465c4a2f0d318157354bea28f814c42 [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="FLEXJS_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="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
<property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}" />
<target name="main" depends="check-compile-env,clean,prepare,compile,fonts"
description="Clean build of all SWCs"/>
<target name="check-compile-env" description="Check for the required environment variables">
<ant antfile="${FLEXJS_HOME}/build.xml" target="check-compile-env" dir="${FLEXJS_HOME}"/>
</target>
<target name="prepare" depends="thirdparty-downloads">
<mkdir dir="${basedir}/js/FlexJS/libs" />
<mkdir dir="${basedir}/libs" />
</target>
<target name="thirdparty-downloads" unless="no.thirdparty-downloads" description="Downloads all the required thirdparty code.">
<ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>
</target>
<target name="compile" description="Builds all SWCs but not their resource bundles">
<!-- order may matter due to dependencies -->
<antcall target="Language"/>
<antcall target="Core"/>
<antcall target="Graphics"/>
<antcall target="Binding"/>
<antcall target="Collections"/>
<antcall target="Basic"/>
<antcall target="HTML"/>
<antcall target="Effects"/>
<antcall target="Flat"/>
<antcall target="Charts"/>
<antcall target="DragDrop"/>
<antcall target="Formatters"/>
<antcall target="GoogleMaps"/>
<antcall target="CreateJS"/>
<antcall target="HTML5"/>
<antcall target="JQuery"/>
<antcall target="Mobile"/>
<antcall target="Network"/>
<antcall target="Reflection"/>
<antcall target="Storage"/>
<antcall target="XML"/>
<antcall target="MaterialDesignLite"/>
<antcall target="FontAwesome"/>
<antcall target="Express"/>
</target>
<target name="fonts">
<ant dir="${basedir}/fontsrc" target="main"/>
</target>
<target name="other.locales" description ="Builds resource SWCs for all locales">
<!--<ant dir="${basedir}/projects/FlexJSUI" target="other.locales"/>-->
</target>
<target name="doc" >
<ant dir="${basedir}/projects/Core" 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" description="Cleans all SWCs and their resource bundles">
<!-- Delete output from SWC projects -->
<ant dir="${basedir}/projects/Binding" target="clean"/>
<ant dir="${basedir}/projects/Charts" target="clean"/>
<ant dir="${basedir}/projects/Collections" target="clean"/>
<ant dir="${basedir}/projects/Core" target="clean"/>
<ant dir="${basedir}/projects/DragDrop" target="clean"/>
<ant dir="${basedir}/projects/Effects" target="clean"/>
<ant dir="${basedir}/projects/Express" target="clean"/>
<ant dir="${basedir}/projects/Flat" target="clean"/>
<ant dir="${basedir}/projects/FontAwesome" target="clean"/>
<ant dir="${basedir}/projects/Formatters" target="clean"/>
<ant dir="${basedir}/projects/GoogleMaps" target="clean"/>
<ant dir="${basedir}/projects/CreateJS" target="clean"/>
<ant dir="${basedir}/projects/Graphics" target="clean"/>
<ant dir="${basedir}/projects/Basic" target="clean"/>
<ant dir="${basedir}/projects/HTML" target="clean"/>
<ant dir="${basedir}/projects/HTML5" target="clean"/>
<ant dir="${basedir}/projects/JQuery" target="clean"/>
<ant dir="${basedir}/projects/Language" target="clean"/>
<ant dir="${basedir}/projects/MaterialDesignLite" target="clean"/>
<ant dir="${basedir}/projects/Mobile" target="clean"/>
<ant dir="${basedir}/projects/Network" target="clean"/>
<ant dir="${basedir}/projects/Reflection" target="clean"/>
<ant dir="${basedir}/projects/Storage" target="clean"/>
<ant dir="${basedir}/projects/XML" target="clean"/>
<ant dir="${basedir}/fontsrc" 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 dir="${FLEXJS_HOME}/templates" includeemptydirs="true" failonerror="false">
<exclude name="swfobject/index.template.html" />
<exclude name="swfobject/expressInstall.swf" />
<exclude name="swfobject/swfobject.js" />
<exclude name="swfobject/history/**" />
<exclude name="js-index-template.html" />
</delete>
</target>
<target name="Binding" description="Clean build of Binding.swc">
<ant dir="${basedir}/projects/Binding"/>
</target>
<target name="Charts" description="Clean build of Charts.swc">
<ant dir="${basedir}/projects/Charts"/>
</target>
<target name="Core" description="Clean build of Core.swc">
<ant dir="${basedir}/projects/Core"/>
</target>
<target name="Collections" description="Clean build of Collections.swc">
<ant dir="${basedir}/projects/Collections"/>
</target>
<target name="CreateJS" description="Clean build of CreateJS.swc">
<ant dir="${basedir}/projects/CreateJS"/>
</target>
<target name="DragDrop" description="Clean build of DragDrop.swc">
<ant dir="${basedir}/projects/DragDrop"/>
</target>
<target name="Effects" description="Clean build of Effects.swc">
<ant dir="${basedir}/projects/Effects"/>
</target>
<target name="Express" description="Clean build of Express.swc">
<ant dir="${basedir}/projects/Express"/>
</target>
<target name="Flat" description="Clean build of Flat.swc">
<ant dir="${basedir}/projects/Flat"/>
</target>
<target name="FontAwesome" description="Clean build of FontAwesome.swc">
<ant dir="${basedir}/projects/FontAwesome"/>
</target>
<target name="Formatters" description="Clean build of Formatters.swc">
<ant dir="${basedir}/projects/Formatters"/>
</target>
<target name="GoogleMaps" description="Clean build of GoogleMaps.swc">
<ant dir="${basedir}/projects/GoogleMaps"/>
</target>
<target name="Graphics" description="Clean build of Graphics.swc">
<ant dir="${basedir}/projects/Graphics"/>
</target>
<target name="Basic" description="Clean build of Basic.swc">
<ant dir="${basedir}/projects/Basic"/>
</target>
<target name="HTML" description="Clean build of HTML.swc">
<ant dir="${basedir}/projects/HTML"/>
</target>
<target name="HTML5" description="Clean build of HTML5.swc">
<ant dir="${basedir}/projects/HTML5"/>
</target>
<target name="JQuery" description="Clean build of JQuery.swc">
<ant dir="${basedir}/projects/JQuery"/>
</target>
<target name="Language" description="Clean build of Language.swc">
<ant dir="${basedir}/projects/Language"/>
</target>
<target name="MaterialDesignLite" description="Clean build of MaterialDesignLite.swc">
<ant dir="${basedir}/projects/MaterialDesignLite"/>
</target>
<target name="Mobile" description="Clean build of Mobile.swc">
<ant dir="${basedir}/projects/Mobile"/>
</target>
<target name="Network" description="Clean build of Network.swc">
<ant dir="${basedir}/projects/Network"/>
</target>
<target name="Reflection" description="Clean build of Reflection.swc">
<ant dir="${basedir}/projects/Reflection"/>
</target>
<target name="Storage" description="Clean build of Storage.swc">
<ant dir="${basedir}/projects/Storage"/>
</target>
<target name="XML" description="Clean build of XML.swc">
<ant dir="${basedir}/projects/XML"/>
</target>
<target name="flex-config" depends="playerglobal-setswfversion" description="Copy the flex config template to flex-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>
</target>
<target name="air-config" depends="playerglobal-setswfversion" description="Copy the air config template to air-config.xml and inject version numbers">
<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>
</target>
<target name="js-config" depends="playerglobal-setswfversion" description="Copy the js config template to js-config.xml and inject version numbers">
<copy file="${basedir}/js-config-template.xml" tofile="${basedir}/js-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="jquery-config" depends="playerglobal-setswfversion" description="Copy the jquery config template to jquery-config.xml and inject version numbers">
<copy file="${basedir}/jquery-config-template.xml" tofile="${basedir}/jquery-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="createjs-config" depends="playerglobal-setswfversion" description="Copy the createjs config template to createjs-config.xml and inject version numbers">
<copy file="${basedir}/createjs-config-template.xml" tofile="${basedir}/createjs-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="node-config" depends="playerglobal-setswfversion" description="Copy the node config template to node-config.xml and inject version numbers">
<copy file="${basedir}/node-config-template.xml" tofile="${basedir}/node-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>
</target>
</project>