IntelliJ IDEA 14.0.0 Web Help

Working with Build Configurations

Every Flash module in IntelliJ IDEA includes one or more build configurations. A build configuration defines how the module source files are transformed into the target output type (SWF or SWC) and then packaged.

One build configuration is created when creating a module. You can add more build configurations if and when needed.

Build configuration types

The build configuration type is defined by the following:

  • Target platform (i.e. the environment in which the developed content is going to be used): Web (for Flash player / Web browser-targeted content), Desktop (for Adobe AIR-targeted content), or Mobile (AIR Mobile, for the content intended for Android and iOS mobile devices).
  • Whether the build configuration uses the Flex framework or is pure ActionScript.
  • Output type: Application (a runnable application, an SWF file), Library (an SWC file), or a Runtime-loaded module (a dynamically-loadable module, an SWF file).

Main options for build configurations

Once the build configuration type is defined, the following main options can be specified:

Build configuration dependencies (build path)

Generally, the build path for each build configuration may be defined by the following:

  • Flex SDK. The necessary SDK SWCs are selected automatically depending on the build configuration type. Additionally, you can manage the set of the SWCs by selecting the following:
    • For the Web target platform: the Flash player version. If the SDK includes more than one player version, you can choose which of the corresponding SWCs should be used.
    • For Flex framework-based build configurations: the Flex 4 component sets. You can specify that only the Spark or MX or both component sets should be used.

      For Flex components you can specify their framework linkage type (Merged Into Code, RLS or External).

  • Other build configurations that generate libraries and runtime-loaded modules.
  • 3rd-party libraries, both SWC and raw ActionScript.

Compiler options

Each build configuration is associated with a set of compiler options.

IntelliJ IDEA provides the default sets of compiler options at the level of the IDE, project and module.

The defaults at a lower level may be inherited from the upper level or redefined. At the level of individual build configurations, similarly, the compiler options may be inherited from the module level defaults. Alternatively, build configuration-specific values may be specified.

IntelliJ IDEA provides a convenient interface for editing the defaults at various levels. There is also an ability to restore the defaults for the values that were changed.

Active build configuration

One of the build configurations is set active for the corresponding module.

The active build configuration provides the basis for source code highlighting in the editor. So when you change the active configuration, the code highlighting in the module changes as well.

Managing build configurations and their settings

  1. Open the Project Structure dialog (Ctrl+Shift+Alt+S).
  2. Under Project Settings, select Modules.
  3. In the area under project_structure_toolbar_2_modules, expand the necessary Flash module node and select any of the build configurations. Now you can:
    • View and edit the settings for the selected build configuration on the Build Configuration page shown in the right-hand part of the dialog.
    • Create a copy of the selected build configuration. To do that, click copy or select Copy in the context menu. Specify the settings for the copy the build configuration in the dialog that opens. Note that depending on the settings, the copy of the build configuration may have the type different from that of the original. See Possible changes when changing the build configuration type.
    • Find the usages of the selected build configuration in the project. To do that, click find.png, press Alt+F7 or select Find usages in the context menu.
    • Delete the selected build configuration. To do that, click delete, press Delete or select Delete in the context menu.
    • Create a new build configuration. To do that:
      1. Click add, press Alt+Insert or select New in the context menu.
      2. Select Flash build configuration.
      3. In the Add Build Configuration dialog that opens, specify the name and select the main options for the new build configuration, and click OK.
      4. If necessary edit the build configuration settings on the Build Configuration page.
    • Change the build configuration type. To do that, click Change on the General tab (to the right of the area where the build configuration type is shown) and specify the build configuration properties in the dialog that opens. See Possible changes when changing the build configuration type.
  4. Click OK in the Project Structure dialog.

Selecting an active build configuration

Using shortcuts to open build configuration settings

Possible changes when changing the build configuration type

When changing the build configuration type (by using the Change type command or when creating a copy of a build configuration), the following changes may occur if the build configuration output type has changed (e.g., from Application to Library):

  • The output file name extension may change (from .swf to .swc and vice versa).
  • If the output type has changed to Library, dependencies on runtime-loaded modules (if existed) are removed.
  • If dependencies on the build configuration with the changed type have become inappropriate, such dependencies are removed.

When creating a copy of a build configuration, the following changes occur in addition:

  • The output file name changes.
  • If applicable, the package file name or names change.

See Also

Last modified: 4 December 2014
comments powered by Disqus