Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FLEX ant file with as3 library project feature
<?xml version="1.0" encoding="utf-8"?>
<!-- This build file provdes a close approximation of the build process
and build settings inside Flash Builder, but it is not an exact copy.
Please customize this file as necessary. -->
<!-- Generated from project settings as of 3/18/14 6:45 PM -->
<project name="XXXXLib1.0" default="build" basedir=".">
<property name="FLEX_HOME" value="C:\Software\FLEX\sdks\4.6.0_Air3.8"/>
<property name="SDK_VERSION" value="4.6.0"/>
<taskdef name="mxmlc" classname="flex.ant.MxmlcTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<taskdef name="compc" classname="flex.ant.CompcTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<taskdef name="html-wrapper" classname="flex.ant.HtmlWrapperTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<taskdef name="asdoc" classname="flex.ant.AsDocTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<property name="PROJECT_DIR" value="."/>
<property name="SOURCE_DIR" value="${PROJECT_DIR}/src"/>
<property name="OUTPUT_DIR" value="${PROJECT_DIR}/bin"/>
<property name="LOCALE" value="en_US"/>
<target name="build">
<antcall target="clean"/>
<antcall target="compile"/>
</target>
<target name="clean">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${OUTPUT_DIR}" includes="**/*"/>
</delete>
</target>
<target name="compile">
<!--Update-version -->
<propertyset id="tdate">
</propertyset>
<tstamp>
<format property="tdate" pattern="yyyyMMdd" />
</tstamp>
<buildnumber file="build.number" />
<echo>updating version to current datetime: ${tdate}</echo>
<echo>updating build number to: ${build.number}</echo>
<!--Does't work here
<pathconvert property="My.classes" pathsep=" ">
<fileset dir="${SOURCE_DIR}/com">
<include name="**/*.as"/>
<include name="**/*.mxml"/>
</fileset>
<compositemapper>
<packagemapper from="${SOURCE_DIR}\*.as" to="*"/>
<packagemapper from="${SOURCE_DIR}/*.as" to="*"/>
<packagemapper from="${SOURCE_DIR}\*.mxml" to="*"/>
<packagemapper from="${SOURCE_DIR}/*.mxml" to="*"/>
</compositemapper>
</pathconvert>
-->
<compc
fork="false"
maxmemory="1024m"
output="${OUTPUT_DIR}/YourLib_${SDK_VERSION}_${tdate}_${build.number}.swc"
include-classes="all of your class here,for exampe: com.aa.bb.MyClass"
>
<!--
<include-classes dir="${SOURCE_DIR}/com">
<include name="**/*" />
</include-classes>
-->
<source-path path-element="${SOURCE_DIR}"/>
<library-path file="${FLEX_HOME}/frameworks/libs/framework.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/textLayout.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/spark.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/sparkskins.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/rpc.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/charts.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/spark_dmv.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/osmf.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/mx/mx.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/advancedgrids.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/authoringsupport.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/flash-integration.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/aircore.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/airframework.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/airspark.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/applicationupdater.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/applicationupdater_ui.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/servicemonitor.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/locale/${LOCALE}" append="true"/>
<library-path file="${PROJECT_DIR}/libs/robotlegs-framework-v2.2.0.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/exchange2.05.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/listPanel.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/transmc.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/handler.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/task-1.10.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/PNGEncoder2.swc" append="true"/>
<external-library-path file="${FLEX_HOME}/frameworks/libs/air/airglobal.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/authoringsupport.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/flash-integration.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/aircore.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/airframework.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/airspark.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/applicationupdater.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/applicationupdater_ui.swc" append="true"/>
<library-path file="${FLEX_HOME}/frameworks/libs/air/servicemonitor.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/robotlegs-framework-v2.2.0.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/exchange2.05.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/listPanel.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/transmc.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/handler.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/task-1.10.swc" append="true"/>
<library-path file="${PROJECT_DIR}/libs/PNGEncoder2.swc" append="true"/>
<library-path dir="${FLEX_HOME}/frameworks/locale/${LOCALE}" includes="*" append="true"/>
<define name="CONFIG::DEV" value="false"/>
<define name="CONFIG::LOGGING" value="false"/>
</compc>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.