The
Configuration interface allows clients to set compiler options for Application and Library. The client can not instantiate a
Configuration object. It can be obtained by invoking the
getDefaultConfiguration() method in
Application and
Library.
Application app = new Application(new File("HelloWorld.mxml")); Configuration c1 = app.getDefaultConfiguration(); Library lib = new Library(); Configuration c2 = lib.getDefaultConfiguration(); The compiler populates the default
Configuration object with the values in
flex-config.xml. If a local configuration file is also available (for example,
HelloWorld-config.xml), the compiler also uses values in that file to populate the
Configuration object. The local configuration file's values take precedence over options set in the
flex-config.xml file. If you add a configuration file using the
addConfiguration() method, that configuration file's options take precedence over those set in flex-config.xml or in a local configuration file; they do not take precedence over configuration options set using the
Configuration interface's methods such as
setExterns().
The order of configuration option precedence is as follows (highest first):
1. Methods of the Configuration interface such as setExterns(). 2. Configuration file loaded with the addConfiguration() method. 3. Local configuration file (such as app_name-config.xml). 4. The flex-config.xml file. 5. Default compiler settings.
@version 2.0.1
@author Clement Wong