[英]Is it possible to customize IntelliJ IDEA 14.0's “Refresh all Gradle projects” / Gradle projects sync behavior?
When I hit the Refresh all Gradle projects button in IntelliJ IDEA, it uses its built-in Gradle scripts comprehension mechanism to produce the IDE's build configuration. 当我在IntelliJ IDEA中点击Refresh all Gradle projects按钮时,它使用其内置的Gradle脚本理解机制来生成IDE的构建配置。 However, it doesn't always do exactly what I want.
但是,它并不总是能够完全满足我的要求。 Is there a way to customize its behavior?
有没有一种方法可以自定义其行为? Perhaps make IDEA understand Gradle's IDEA plugin ?
也许使IDEA了解Gradle的IDEA插件 ?
Experiments show that IntelliJ IDEA is completely oblivious to the apply plugin: 'idea'
. 实验表明,IntelliJ IDEA完全忽略了
apply plugin: 'idea'
。 There is no auto-complete and no Gradle tasks from it are recognized. 没有自动完成功能,也不会识别任何Gradle任务。 The IDEA's Gradle integration roadmap linked from Gradle's tooling page is severely outdated and doesn't seem to mention anything on this subject.
从Gradle的工具页面链接的IDEA的Gradle集成路线图已严重过时,似乎没有提及此主题。
IntelliJ is affected by apply plugin: 'idea'
(which should always be done) and (some of the) related configuration in the build script. 的IntelliJ 是受
apply plugin: 'idea'
(应该始终做)和(一些)在构建脚本相关的配置。 There is already quite some auto-completion, but obviously it's not perfect yet. 已经有一些自动补全功能,但显然还不完善。 Expect improvements with every new IntelliJ and Gradle release.
预期每一个新的IntelliJ和Gradle版本都会有所改进。
For now, if you want utmost customizability, consider generating the IntelliJ project with gradle idea
, rather than using IntelliJ's Gradle integration. 现在,如果要最大程度的自定义,请考虑使用
gradle idea
生成IntelliJ项目,而不是使用IntelliJ的Gradle集成。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.