I'm trying to figure out why when I compile my Flex 4 Library swc using a simple ANT tasks, it compiles to about three times the size of the swc that's compiled by FlashBuilder.
Here is my ANT script to compile my swc
<target name="compileSWC" description="compiles the Library">
<echo>Compiling Library SWC To Deploy SWC Folder</echo>
<compc debug="false
output="${bin.dir}/${Library.name}-${timeVersion}.swc"
incremental="true"
optimize="true"
headless-server="true"
verbose-stacktraces="true"
default-frame-rate="24">
<source-path path-element="${src.dir}" />
<include-sources dir="${src.dir}" includes="*"/>
<source-path path-element="${src.dir}" />
<compiler.library-path dir="${basedir}/" append="true">
<include name="${library.dir}" />
</compiler.library-path>
</compc>
<echo>Compiled Library SWC To Deploy SWC Folder</echo>
</target>
This yields a swc that is 1,980 KB. This library file has custom components, some skins and images, so I was ok with the file size. But when I use the FlashBuilder to link my Library project to other Flex projects, the compiled swc is only 532 KB.
I am able to move the FlashBuilder compiled swc to any project and it works just fine.
So I'm wondering what is FlashBuilder doing different than my ANT build script to get that file size down? I tried adding 'static-link-runtime-shared-libraries="true"' to my ANT script, but I had the same results.
Thanks.