Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

111 lines (110 sloc) 4.956 kb
<?xml version="1.0"?>
<project name="robotlegs-utilities-modular" basedir="." default="compile">
<!-- set up a prefix for all environment variables -->
<property environment="env."/>
<!-- System environment must contain FLEX_HOME variable that points to Flex SDK -->
<property name="FLEX_HOME" location="${env.FLEX_HOME}"/>
<!-- identify properties file -->
<property file="build.properties"/>
<!-- Set up FlexUnit Ant tasks -->
<target name="usage">
<echo message=""/>
<echo message="Robotlegs Modular Utility Build Usage"/>
<echo message="-----------------------------------"/>
<echo message=""/>
<echo message="Available targets are:"/>
<echo message=""/>
<echo message="package --&gt; Build Robotlegs Modular SWC, test, and create release zip"/>
<echo message="compile --&gt; Build Robotlegs Modular 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 Build and Report files -->
<target name="clean">
<!-- Remove all directories created during the build process -->
<echo>[clean] Removing Build directory</echo>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${dist.loc}" defaultexcludes="false">
<include name="**/*"/>
</fileset>
</delete>
<echo>[clean] Build directory 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 created</echo>
</target>
<!-- Compile Release SWC -->
<target name="compile" depends="init">
<echo>[compile] Compiling release SWC</echo>
<echo>[compile] Using Flex SDK at: ${FLEX_HOME}</echo>
<java jar="${FLEX_HOME}/lib/compc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
<!-- Build our SWC with a versioned name. -->
<arg value="-output=${bin.loc}/${project.name.versioned}.swc"/>
<!-- We want all the org package classes in the SWC being built. -->
<arg value="-include-sources=${main.src.loc}/org"/>
<!-- Include classes from SWCs in this folder, but only the ones we use. -->
<arg value="-library-path+=${lib.loc}"/>
<!-- Keep the magic alive. -->
<arg value="-keep-as3-metadata+=Inject"/>
<arg value="-keep-as3-metadata+=PostConstruct" />
<!-- Boolean mosh pit! -->
<arg value="-incremental=true"/>
<arg value="-static-link-runtime-shared-libraries=true"/>
<arg value="-verbose-stacktraces=true"/>
<arg value="-headless-server=true"/>
</java>
<echo>[compile] Release SWC ${project.name.versioned}.swc created successfully</echo>
</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}"/>
<mkdir dir="${dist.loc}/bin"/>
<mkdir dir="${dist.loc}/src"/>
<mkdir dir="${dist.loc}/libs"/>
<copy file="${bin.loc}/${project.name.versioned}.swc" todir="${dist.loc}/bin"/>
<copy file="${lib.loc}/robotlegs-framework-${robotlegs.ver.num}.swc" todir="${dist.loc}/libs"/>
<copy todir="${dist.loc}/src/org">
<fileset dir="${main.src.loc}/org"/>
</copy>
<!-- Copy README -->
<copy file="${template.loc}/README.tmpl" tofile="${dist.loc}/README" overwrite="true">
<filterchain>
<replacetokens>
<token key="date" value="${touch.time}"/>
<token key="rlmodularprojectlink" value="${robotlegs.modular.project.link}"/>
<token key="rlmodularversion" value="${robotlegs.modular.ver.num}"/>
<token key="rlversion" value="${robotlegs.ver.num}"/>
<token key="releasename" value="${project.name.versioned}"/>
<token key="ssversion" value="${swift.suspenders.version}"/>
<token key="sslink" value="${swift.suspenders.link}"/>
<token key="rlprojectlink" value="${robotlegs.project.link}"/>
<token key="bestpracticeslink" value="${robotlegs.faq.link}"/>
<token key="faqlink" value="${robotlegs.best.practices.link}"/>
</replacetokens>
</filterchain>
</copy>
<!-- Copy LICENSE -->
<copy file="LICENSE" tofile="${dist.loc}/LICENSE" 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"/>
<delete dir="${dist.loc}/bin"/>
<delete dir="${dist.loc}/src"/>
<delete dir="${dist.loc}/libs"/>
<echo>[package] Release packaged successfully</echo>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.