Jack Cole
Jack Cole

Reputation: 1804

Tell intelliJ to make 1 single module instead of multiple modules for Gradle

I am working on a gradle project, and IntelliJ makes a sub module for each source set. The problem is, if this is done, then each source set needs to be dependent on one another, resulting in circular dependencies.

If I manually setup the modules to be one single module, everything works and there are no circular dependencies. But then the next time the build.gradle is changed, I have to spend 10 minutes redoing everything.

Is there any way to make intelliJ build this as one single module when it reads the gradle file? I looked at the documentation of Idea Module, but it doesn't seem to be of much help.

Upvotes: 0

Views: 576

Answers (1)

Jack Cole
Jack Cole

Reputation: 1804

IntelliJ can be set to only generate a single module per gradle project. Go into your gradle preferences in IntelliJ, and uncheck the option "Create separate module per source set"

Edit: This has been removed in later versions of IntelliJ. My main issue involving dependencies has been resolved, and now I can use different modules just fine.

Upvotes: 1

Related Questions