控制2016.1版Gradle sourceSets中IDEA模块的自动创建? [英] Control automatic creation of IDEA modules from Gradle sourceSets in 2016.1?
问题描述
从
Starting with IntelliJ IDEA 2016.1, IDEA automatically creates IntelliJ modules from Gradle SourceSets (link). While I recognize that this was a major step forward for many reasons, it is also a major change for existing projects which relied on IDEA being source set agnostic. I currently get over 50 new modules that I don't want ...
Do you know of a way to restore IntelliJ's old behavior?
Is there a way to control how modules are created from source sets, for example by excluding a sourceset?
I already checked the Gradle IDEA plugin docs but could not find a solution. I also tried this but it seems to apply only to multi-module projects, not to the source set problem.
I am using Gradle 2.12 and, obviously, IDEA 2016.1.
Currently there is no way of controlling the automatic creation of modules based on projects sourceSets
.
There are quite a lot issues regarding this problem:
https://youtrack.jetbrains.com/issue/IDEA-153231
https://youtrack.jetbrains.com/issue/IDEA-154014
https://youtrack.jetbrains.com/issue/IDEA-153264
Edit:
Since IntelliJ IDEA 2016.1.2 (I think) there is a new option "Create separate module per source set" on "Import Project from Gradle" dialog:
这篇关于控制2016.1版Gradle sourceSets中IDEA模块的自动创建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!