We have a very complex gradle project, with over 400 modules, each controlled by a build.gradle file three directory levels down from the main project and #included. Running the idea plugin generates a mess, with many projects getting two .iml files: one in the project directory, and one in a newly created directory three levels down. For example, given a main directory “mod” and a subproject at “mod/store/file/store” the plugin creates both:

mod/store/file/store/store/file/store.iml, and mod/store/file/store/store_file_store.iml

as well as placing the path mod/store/file/store/src/main/java in the source paths in mod/mod.iml