| <?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="frameworks" default="main" basedir="."> |
| |
| <property name="FLEX_HOME" value="../.."/> |
| <property file="${FLEX_HOME}/build.properties"/> |
| |
| <target name="main" depends="clean,samples" description="Clean build of FABridge"/> |
| |
| <target name="clean" description="cleans all generated and staged files"> |
| <delete includeemptydirs="true" failonerror="false"> |
| <fileset dir="FABridge/samples"> |
| <include name="**/*.swf"/> |
| <exclude name="**/swfobject.js"/> |
| </fileset> |
| </delete> |
| </target> |
| |
| <!-- |
| thirdparty-downloads (swfobject-fabridge-download) copies swfobject.js to |
| FABridge/samples/fabridge/swfobject so that all thirdparty code is |
| centralized. |
| --> |
| <target name="samples" description="build samples" depends="compile-swfs"> |
| <mkdir dir="FABridge/samples/fabridge/javascript"/> |
| <copy file="FABridge/src/bridge/FABridge.js" todir="FABridge/samples/fabridge/javascript" /> |
| </target> |
| |
| <macrodef name="compile-sample"> |
| <attribute name="file"/> |
| <sequential> |
| <echo message="Compiling @{file}"/> |
| <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/lib/flexTasks.jar"/> |
| <mxmlc fork="true" |
| file="@{file}"> |
| <jvmarg line="${mxmlc.jvm.args}"/> |
| <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/> |
| <source-path path-element="${basedir}/FABridge/src"/> |
| </mxmlc> |
| </sequential> |
| </macrodef> |
| |
| <target name="compile-swfs" description="Compile the sample swfs."> |
| <compile-sample file="${basedir}/FABridge/samples/EmptySwf.as"/> |
| <compile-sample file="${basedir}/FABridge/samples/app.mxml"/> |
| </target> |
| |
| </project> |