For Gradle projects, should I have one module or many?

When using Gradle, should I have a single root project and module, then do everything else using subfolders, or should I create sub-modules using New Module -> Gradle within the root module?

2 comments
Comment actions Permalink

Hello Jon,

Could you add more information about your project structure and use case?

0
Comment actions Permalink

Hi Yaroslav,

I have a pretty standard setup: A root IDEA project containing a few Java modules that get compiled into an application. I'm trying to replace the IDE build with Gradle so I can build from the command line, from my CI server, etc. I was creating a root Gradle project, then creating new Gradle modules inside it, but IDEA kept getting confused about the hierarchy, randomly deleting my .iml files, putting nonsense in the Gradle tool window, etc.

But I've actually managed to solve things myself. I thought I wasn't setting up my project properly, but it turns out the Gradle support in IDEA 13 is pretty much broken. I installed the 13.1 EAP and things are working properly now.

0

Please sign in to leave a comment.