控制2016.1版Gradle sourceSets中IDEA模块的自动创建? [英] Control automatic creation of IDEA modules from Gradle sourceSets in 2016.1?

查看:617
本文介绍了控制2016.1版Gradle sourceSets中IDEA模块的自动创建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆