new "src" root folder in project view using gradle in 2016.1


I am working in an intellij project with both intellij modules together with the gradle plugin. Since the 2016.1 upgrade intellij builds up a artificial "src" root module (four small blue squares in the overlay icon) in the project view for the gradle plugin. The whole root of the gradle project is still included as a default intellij module (one big blue square icon overlay), so i have both an "src" folder structure and the intellij module including all files in the project view. Following problems occur:


- the src folder is expanding "on its own" - if I close the folder it may open on its own and it is scrolling away my project browser

- if the same folder structure is opened in the "src" root folder and in the intellij module the "jump to source" functionality does not work any more, because the files is included twice in the project tree (src/... and the old module/...)

- closing the src solves the above issue, but src is opening "on its own" on various conditions and i am constantly scrolling and closing the src folder again


So my querstion: is there a way to get rid of the new artificial "src" (artificial and automatically generated gradle plugin entry) in the project view? Or can I close it permanently? 

Comment actions Permalink

Could you please share a small sample project that will reproduce this problem?

Does the issue still occur in the EAP build available at ? Make sure to refresh the project.

Comment actions Permalink

Ok - thank you for your reply.


The new EAP seems to prevent assigning a source folder which is already part of anoter (gradle generated) module, which may help already the duplicated source files within the tree. 

In the end this problem is related to have a single build.gradle in the root folder to enable the gradle build tab. I have 3 modules in my project, one is using gradle and two are using custom ant files. So i put a (empty!) build.gradle to the root folder to enable the gradle tab. But the gradle generated modules do not show the content of the file system (maybe due to the empty root build.gradle), so I added the gradle module root folder as separate intellij module

So I have 3 modules, one of these is build with gradle. I guess this is not a supported way of setting up the gradle plugin, I have to live with the problems associated with this. But it would be nice to allow the gradle plugin to manage a module instead of managing the whole project, so there is a way to mix "old" and "new" modules.


I guess there may be no real answer until intellij may allow to manage modules with gradle, not only the project folder root, So I accept this as answer,


Please sign in to leave a comment.