Adding Gradle module causes all other modules to expand in the project view and adds src dirs
已回答
When adding a new Gradle module to my project, it causes all other modules to get expanded in the project viewer.
Furthermore, adding a new module also causes all other modules without source directories to add those directories. This is undesirable since I have modules that are simply containers for other modules without sources themselves.
How can I prevent these things?
请先登录再写评论。
Hello, Thomas!
Thank you for reporting this!
I've reproduced the issues you've described and created YouTrack Issues for them (IDEA-358502, IDEA-358503) - further updates on the issues investigation and resolution will be posted there.
Darrin5698vitiello
Using the community Edition 2024.1.2, I cannot find this menu option, should I upgrade to a newer version to access this setting?
Currently, the empty modules do not even have a build gradle file. They are simply included as modules from the settings.gradle.
Roman Vatagin Glad I could help!
Thomasrutger I don't think the option Darrin5698vitiello mentioned would help anyway, it's for opening files in the Editor and not Project structural updates like adding a new Module.
As a possible workaround, until the issue is resolved, I can suggest creating Modules via Gradle directly (gradle init), you will have to manually link the Module to the parent Project, but it still may be more convenient as it won't create any unneeded directories in other Modules.