<?xml version="1.0" encoding="utf-8"?>
<project name="Flex Ant Task" default="wrapper" basedir=".">
<taskdef resource="flexTasks.tasks" classpath="${basedir}/flexTasks/lib/flexTasks.jar" />
<property name="FLEX_HOME" value="C:/Program Files/Adobe/Flex Builder 3/sdks/3.2.0"/>
<property name="APP_ROOT" value="${basedir}/flex_src"/>
<property name="deploy_dir" value="${basedir}/flex_bin"/>
<property name="fileName" value="MortgageCalc"/>
<property name="package" value="mortgage/" />
<target name="cleanCompile">
<delete dir="${deploy_dir}"/>
<mkdir dir="${deploy_dir}"/>
</target>
<target name="compileMXML" depends="cleanCompile">
<mxmlc
file="${APP_ROOT}/${package}${fileName}.mxml"
output="${deploy_dir}/${package}${fileName}.swf"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="false"
warnings="false"
incremental="true"
>
<compiler.source-path path-element="${APP_ROOT}"/>
<compiler.source-path path-element="${APP_ROOT}/store"/>
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<source-path path-element="${FLEX_HOME}/frameworks"/>
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="locale" />
</compiler.library-path>
<!-- <default-size width="800" height="600"/> -->
</mxmlc>
</target>
<target name="compileCOMP">
<compc
output="${deploy_dir}/MyComps.swc"
include-classes="custom.MyButton custom.MyLabel">
<source-path path-element="${basedir}/components"/>
<include-file name="f1-1.jpg" path="assets/images/f1-1.jpg"/>
<include-file name="f1-2.jpg" path="assets/images/f1-2.jpg"/>
<include-file name="f1-3.jpg" path="assets/images/f1-3.jpg"/>
<include-file name="f1-4.jpg" path="assets/images/f1-4.jpg"/>
<include-file name="main.css" path="assets/css/main.css"/>
</compc>
</target>
<target name="cleanWrapper">
<delete>
<fileset dir="${deploy_dir}/${package}" includes="history.swf" defaultexcludes="false"/>
<fileset dir="${deploy_dir}/${package}" includes="playerProductInstall.swf" defaultexcludes="false"/>
<fileset dir="${deploy_dir}/${package}" includes="${fileName}*.html" defaultexcludes="false"/>
<fileset dir="${deploy_dir}/${package}" includes="history.htm" defaultexcludes="false"/>
<fileset dir="${deploy_dir}/${package}" includes="*.js" defaultexcludes="false"/>
</delete>
</target>
<target name="wrapper" depends="compileMXML">
<html-wrapper
application="flexApp"
bgcolor="black"
title="Flex Ant Builder Sample"
width="100%"
height="100%"
swf="${fileName}"
version-major="9"
version-minor="0"
version-revision="0"
history="true"
template="express-installation"
output="${deploy_dir}/${package}"/>
<!-- <move file="${deploy_dir}/${package}index.html" tofile="${deploy_dir}/${fileName}.html"/>
<move file="${deploy_dir}/${package}${fileName}.swf" tofile="${deploy_dir}/${fileName}.swf"/> -->
</target>
</project>