Create a Flex Library Module in IntelliJ IDEA 9

Written by

Time for another simple IntelliJ IDEA 9 step by step guide. This time I will run through how to create a Module Library (equivalent to a Library Project in Eclipse) and then create a Flex Module in the same Project space to utilise this new Module Library. This FAQ for Eclipse users is great for understanding the slight changes in terminology i.e. Project/Module.

Step 1

Step 2

Step 3

Step 4

Step 5

Now grab all the libraries you want to utilise in your Modules for this Project and drag them into the src directory of your newly created Library Module. As you can see I have a com directory and an org directory which contains the PureMVC Multicore source with the Loadup, Pipes and StateMachine utilities.

Step 6

Step 7

Step 8

In the Module settings ensure that you output this Module as a SWC.

Step 9

Now follow the first few steps above again to create a new Flex Module which will utilise this new Library.

Step 10

Step 11

In this new Modules settings set up a Module Dependency to our Library.

Step 12

Step 13

Create a new mxml application component to test out our work.

Step 14

Step 15

Note that we have not yet built the Library SWC, you can now do this when you choose, we will automatically have code completion etc for our Library Classes in the new Flex Module prior to building the SWC.