When creating a new project in Flash Builder, how does it determine which sdk libraries to include in the build path?
If I create a new plain Actionscript project and select Flex 4.1 the following libraries show up in the build path:
If I go back and switch to Flex 3.5 it only includes:
If I make a new Flex Web project and select Flex 3.5 it includes:
Are these values hardcoded in Flash Builder or is it somehow reading them from the SDK config files? I looked through all the xml config files like flex-config.xml and air-config.xml and it doesn't look like this information exists anywhere.
Thanks.
Yes, it's built into the framework swc's. You can find the references and where they're linked in under the /frameworks/build.xml file in your framework directory.
So you could edit this build file, rebuild the swcs and then use those and they'll link how you like.
For example, (from Flex 4.5.1 build file) :
<target name="authoringsupport" description="Builds authoringsupport.swc">
<compc static-link-runtime-shared-libraries="true" fork="true" output="${basedir}/libs/authoringsupport.swc" include-classes="AuthoringSupportClasses" locale="" accessible="true">
<source-path path-element="${authoringsupport.dir}/src"/>
<library-path dir="${authoringsupport.dir}/libs"><include name="FlexContentHolderThumbnail.swc"/></library-path>
<external-library-path dir="${basedir}/libs">
<include name="player/${playerglobal.version}/playerglobal.swc"/>
<include name="framework.swc"/><include name="mx/mx.swc"/>
<include name="flash-integration.swc"/>
<include name="textLayout.swc"/>
</external-library-path>
<jvmarg line="${compc.jvm.args}"/>
</compc>
So its not technically hardcoded into flash builder, but in the swc's for that sdk. (but you can change that as noted above). :D
After a lot of trial and error and some inspection with a decompiler I have the answer:
library-path
and library-external-path
adds it to the classpath if it is a SWC. If the entry is a directory it scans that directory for SWCs and includes them.flex.swc
. This list of exclusions is written to the .actionScriptProperties
file..actionScriptProperties
file. (i.e. You can throw any file with a .swc extension in the frameworks/libs directory and Flash Builder will include it.)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With