I have an Intellij module that is using another module as a library. The library can be linked using: Merged, External, Include, or Test.
What do these four options mean? How do they behave differently?
On the Intellij forums, someone mentioned “Merged” and “External” are similar to Flash Builder’s “Merged into code” and “Runtime shared library.” But if that’s the case, what do Include and Test do?
The IntelliJ documentation only links to Adobe’s description of RSLs, but this is how the four settings work:
merge
Links all the library symbols that are actually used in the project, and includes them into the target binary. This should be the default setting for creating SWF executables.
include
Links all of the symbols in the library, regardless of whether they are used, and includes them into the target binary. This is useful when creating extension libraries (include the module you are extending with additional functionality, so that you need to include only one SWC later) or when you use
getDefinitionByNameoften.exclude
Links the library classes at compilation time, but does not include them into the target binary. This means that the target binary stays small, but of course, excluded dependencies must then either be compiled into other libraries or exist as an RSL to be available at runtime – the program can’t run without them. This setting is especially useful when creating library SWCs, which would each include the playerglobal.swc and all their other dependencies, otherwise.
test
Library classes are included only into the temp binaries used for FlexUnit tests. This prevents the FlexUnit framework itself, and other testing frameworks, such as Hamcrest or Mockolate, from bloating the production binary.