Every time I add a dependency to my project's build.gradle, IntelliJ notifies me that 2 modules ([projname]-main & [projname]-test) are no longer imported. It then changes my project config in ways I don't understand (which includes adding a module under a long-outdated project name), makes all my run configurations unusable, and gives me about a million cannot-resolve-symbol build errors. I have to do a lot of cleaning up (eg. deleting the new .iml files IntelliJ creates) before I can proceed). I start to sweat every time I need to add a dependency (maybe that's a good thing).
Clearly there's something I don't understand about how IntelliJ generates modules from my build.gradle. The project structure is very simple (a main and a test module, which I set up manually in the project config editor). My build.gradle just applies the java plugin, adds repos, and main & test dependencies.
So two questions:
- can I tell IntelliJ just to leave my project/module config for me to manage?
- if not, can someone point to me the docs explaining how IntelliJ automatically creates modules from build.gradle?
(Btw I have no special reason to think this is EAP-related; I just happen to be using the EAP)