0

I want to get my compilation settings out of the Flash Builder UI and into a config.xml file. I mainly want to do this so individuals on my team that do not have Flash Builder can still compile projects. I've defined a config file like so (simplified):

<flex-config>
    <compiler>
        <library-path append="true">
            <path-element>C:\Libraries\someLibrary.swc</path-element>
        </library-path>
    </compiler>
</flex-config>

And I've added the following compiler argument in Flash Builder under the Project Properties -> Flex Compiler -> Additional compiler arguments area:

-load-config+=config\myCustomConfig.xml

When I do this, I get inline errors in my project files that have references to classes in someLibrary.swc. Am I doing something wrong here, or is this not possible? It's maddening to me that we would have to maintain a number of settings in two places. If this is not possible, what do other people do to get around this? Simply switch to compiling with ANT entirely and missing out on inline compiler errors?

Ocelot20
  • 10,510
  • 11
  • 55
  • 96
  • Why you are not adding *.swc references through FlashBuilder's project Properties under "Flex Build Path" in "Library Path" – Imran May 31 '12 at 09:03
  • That *is* what I'm doing, but I'd like to be able to do it in only one place that can also be used by the command line compiler. – Ocelot20 May 31 '12 at 13:03
  • In that case just Configure your eclipse/Flash Builder to use your ant file for build, http://stackoverflow.com/questions/3373429/eclipse-ant-plugin. – Imran May 31 '12 at 15:31
  • I tried that, but it gets rid of the inline error flagging that I think is essential to development. – Ocelot20 May 31 '12 at 19:39
  • do not change configuration in Existing FlashBuilder Project, just build App with help of ANT – Imran May 31 '12 at 22:05

1 Answers1

0

Well, i think there is a difference in configuring the compiler and configuring the ide. I might be wrong, but also in IntelliJ that's the case. The ide does not parse but pass the config as an argument to the compiler.

Also, the benefit of using the compiler-config in first hand is, that you can share a standard config. This can/should be used in different environments (local, continuous integration) or builds (command line vs ANT).

Also, i'd suggest to use relative paths if possible.

Florian Salihovic
  • 3,921
  • 2
  • 19
  • 26