Archive for acompc

Flex 3.5, AIR swc & ANT tasks

Posted in Actionscript, AIR with tags , , , on June 8, 2010 by andkrup

I am stuck on Flex SDK 3.5 at work.

Today I wanted to create a code library swc file with some AIR-specific classes and I wanted to write a build file.

It seems that there isn’t an acompc-task included in the Flex 3.5 sdk (3.5.0 build 12683), so I was using the exec-task and wrote arg-tags to expand the list of included library-paths.

External-library-path is a nice alternative to library-path if you do not want to redistribute code existing in other swc files, but I got into some problems when I wanted to use -external-library-path, because the syntax apparently has to be a bit different.

This syntax is valid but doesn’t work:

<arg line='-external-library-path "path/to/my.swc"' />

This syntax is also valid, but appears to be similar to setting the attribute append to “true” in the compc ANT-task:

<arg line='-external-library-path+="path/to/my.swc"'/>

If you have tried to substitute the library-path option with external-library-path you might have found that you have to set append=”true” and apparently this is how the command-line version looks like.