Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
111 lines (106 sloc) 5.2 KB
<?xml version="1.0"?>
<project name="InputAssist" basedir="." default="build-library">
<!-- identify properties file -->
<property file="build.properties"/>
<fail>
<condition>
<not>
<isset property="FLEX_HOME" />
</not>
</condition>
Error!
You need to set FLEX_HOME property (path to Flex SDK)
in build.properties file
located in the same dir as build.xml!
For example:
FLEX_HOME = C:\\flex\\sdk\\
</fail>
<!-- Set up Flex Ant tasks -->
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<target name="usage">
<echo message=""/>
<echo message="InputAssist Build Usage"/>
<echo message="-----------------------------------"/>
<echo message=""/>
<echo message="Available targets are:"/>
<echo message=""/>
<echo message="build-library --&gt; Build InputAssist SWC"/>
<echo message="clean --&gt; Remove all folders created by build script"/>
<echo message="init --&gt; Clean and create build folders"/>
<echo message=""/>
</target>
<!-- Clean Distrib files -->
<target name="clean">
<!-- Remove all directories created during the build process -->
<echo>[clean] Removing the contents of Distrib directory</echo>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${dist.loc}" defaultexcludes="false">
<include name="**/*"/>
</fileset>
</delete>
<echo>[clean] The contents of Distrib directory are removed</echo>
</target>
<!-- Create directories needed for the build process -->
<target name="init" depends="clean">
<echo>[init] Creating Bin directory</echo>
<mkdir dir="${bin.loc}"/>
<echo>[init] Bin directory is created</echo>
</target>
<!-- Compile InputAssist SWC with a versioned name.-->
<target name="build-library" depends="init">
<echo>[build-core] Compiling InputAssist SWC</echo>
<echo>[build-core] Using Flex SDK at: ${FLEX_HOME}</echo>
<compc output="${bin.loc}/${project.name.versioned}.swc"
defaults-css-url="${basedir}/defaults.css">
<incremental>true</incremental>
<accessible>true</accessible>
<debug>false</debug>
<optimize>true</optimize>
<strict>true</strict>
<namespace uri="http://www.jabbypanda.com/2010/controls" manifest="${basedir}/manifest.xml" />
<namespace uri="library://ns.adobe.com/flex/spark" manifest="${FLEX_HOME}/frameworks/spark-manifest.xml"/>
<namespace uri="http://ns.adobe.com/mxml/2009" manifest="${FLEX_HOME}/frameworks/mxml-2009-manifest.xml"/>
<namespace uri="http://www.adobe.com/2006/mxml" manifest="${FLEX_HOME}/frameworks/mxml-manifest.xml"/>
<include-namespaces>http://www.jabbypanda.com/2010/controls</include-namespaces>
<include-file name="defaults.css" path="${basedir}/defaults.css"/>
<include-file name="manifest.xml" path="${basedir}/manifest.xml"/>
<include-file name="InputAssistSkin.mxml" path="${basedir}/src/com/jabbypanda/skins/InputAssistSkin.mxml"/>
<source-path path-element="${basedir}/src"/>
<external-library-path dir="${FLEX_HOME}/frameworks/libs/" append="true">
<include name="*.swc"/>
</external-library-path>
</compc>
</target>
<!-- Package the Build -->
<target name="package">
<tstamp>
<format property="touch.time" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
</tstamp>
<!-- Assemble -->
<echo>[package] Packaging Release</echo>
<mkdir dir="${dist.loc}"/>
<copy file="${bin.loc}/${project.name.versioned}.swc" todir="${dist.loc}"/>
<!-- Copy README -->
<copy file="${template.loc}/README.tmpl" tofile="${dist.loc}/README" overwrite="true">
<filterchain>
<replacetokens>
<token key="date" value="${touch.time}"/>
<token key="libraryVersion" value="${InputAssist.ver.num}"/>
<token key="releaseName" value="${project.name.versioned}"/>
<token key="inputAssistSourceLink" value="${InputAssist.project.sourceLink}"/>
</replacetokens>
</filterchain>
</copy>
<!-- Copy LICENSE -->
<copy file="LICENSE" todir="${dist.loc}" overwrite="true"/>
<!-- Zip It -->
<zip destfile="${dist.loc}/${project.name.versioned}.zip">
<fileset dir="${dist.loc}"/>
</zip>
<!-- Clean Up -->
<delete file="${dist.loc}/${project.name.versioned}.swc"/>
<delete file="${dist.loc}/README"/>
<delete file="${dist.loc}/LICENSE"/>
<echo>[package] Release package successfully</echo>
</target>
</project>