multiple gradle modules in one project

I am migrating from Eclipse.  In my eclipse workspace I can have open all projects that are interdependent.

I'm trying to include multiple modules in IDEA.  Each time I use JetGradle to select my build.gradle file all other modules disappear.

I can import all necessary modules wihtout using gradle.  They don't resolve the dependencies.

I have:
2 git projects
  both use gradle to build and manage dependencies

I'd like:
1 IDEA project view to see all related projects and have each of those able to independently resolve their own depdencies as well as independent builds.

I cannot seem to find the right combination of importing/creating to accomplish it.

I accomplished this before we moved to gradle (using ant/ivy).

How do I accomplish this?

1 comment

Hi David,

Support for multiple gradle modules within one IDE project was added in the recent gradle plugin version.
In case of v.12.1.x, you should update IDE with the latest gradle plugin (see howto => pre-assembled set)

To get multiple gradle modules in one project you can do the following:
1. Import project1
2. Open "Gradle Tool Window" panel, press "Attach Gradle Project" button on top of the panel
3. Select "build.gradle" file of the next gradle project
4. Press OK.


Please sign in to leave a comment.