Skip to content

Instantly share code, notes, and snippets.

@mimshwright
Created November 14, 2009 00:14
Show Gist options
  • Save mimshwright/234288 to your computer and use it in GitHub Desktop.
Save mimshwright/234288 to your computer and use it in GitHub Desktop.
sample ant task using compc
<!--
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="MyLib" />
<target name="build" description="Compiles source into a SWC library file.">
<echo>Compiling library.</echo>
<compc output="${project.output.binaryPath}/${project.output.fileName}.swc">
<source-path path-element="${project.sourcePath}" />
<library-path dir="${project.libraryPath}" includes="*" />
<include-sources dir="${project.sourcePath}" includes="*" />
</compc>
<echo>Success! Created ${project.output.fileName}.swc</echo>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment