Skip to content

Instantly share code, notes, and snippets.

@mimshwright
Created November 14, 2009 00:21
Show Gist options
  • Save mimshwright/234291 to your computer and use it in GitHub Desktop.
Save mimshwright/234291 to your computer and use it in GitHub Desktop.
sample ant task using mxmlc
<!--
The Location of your Application Classes on your Computer
NOTE: This Path should be reletive to the build.xml file.
NOTE: ${basedir} is an ant property that represents the directory holding the build.xml file
-->
<property name="project.sourcePath" location="${basedir}/src"/>
<property name="project.libraryPath" location="${basedir}/libs"/>
<!-- The Location you wish to output to on your Computer -->
<property name="project.output.binaryPath" location="${basedir}/bin"/>
<property name="project.output.fileName" value="MyApp" />
<target name="build" description="Compiles source into a SWF.">
<echo>Compiling SWF.</echo>
<mxmlc file="MyApp.mxml" output="${project.output.binaryPath}/${project.output.fileName}.swf">
<source-path path-element="${project.sourcePath}" />
<library-path dir="${project.libraryPath}" includes="*" />
</mxmlc>
<echo>Success! Created ${project.output.fileName}.swf</echo>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment