Comment actions Permalink

Please provide a use case.

Normally you have one root Gradle multiproject which references several modules, just import it in IDEA.

Do you need to import completely isolated Gradle projects as different IDEA modules within the same IDEA project?

Comment actions Permalink

Here's an use case.

You have root project A having under it modules a, b, c, d. With time you'll remark that some modules may be reused in other places (util module, a database access module, and etcetera). So that in order that root project C may reuse it, you'll reorganize it as it's own project providing it's own interface. Basically it's grown out of it's module state, and became a project on it's own that publishes versioned jar files into a Maven repository.

But as side effect your directory tree new looks as:

A (referencing b)

C (referencing b)

B (module b moved to it's own project)

Having two separate projects instead of craming it into one has the advantage of faster builds (no build needed, just use the build already present in the Maven repository) and lower configuration time (less files to parse).That said you might work on projects in parallel, so at that point your left to load projects one by one.

Things get frustrating once some things get mest up in your Git repo and occasionally you need to perform a git clean command, as project files are cleaned to, hence you can start over. (that said is there anywhere to place all project files in your home directory, in some place untracked by git?)


Please sign in to leave a comment.