简体   繁体   English

是否可以自定义IntelliJ IDEA 14.0的“刷新所有Gradle项目” / Gradle项目同步行为?

[英]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.

相关问题 Intellij IDEA和Gradle项目 - Intellij IDEA and Gradle projects 具有多个Gradle项目的Intellij IDEA - Intellij IDEA With Multiple Gradle Projects Intellij 2018.2:无法同步Gradle 1.9项目 - Intellij 2018.2: Not able to SYNC Gradle 1.9 projects intellij中是否有键盘快捷键来同步所有gradle项目? - Is there a keyboard shortcut in intellij to synchronize all gradle projects? “刷新所有Gradle项目”有什么作用? - What does “Refresh all Gradle projects” do? 如何将源代码附加到IntelliJ IDEA 13.0中自动生成的基于Gradle的依赖项,以便在下一个Gradle项目刷新后继续使用? - How to attach sources to auto-generated Gradle-based dependencies in IntelliJ IDEA 13.0 in a way that will survive next Gradle projects refresh? 如何在IntelliJ IDEA中更快地调试Spring Boot Gradle项目? - how to debug spring boot gradle projects faster in intellij idea? 为什么IntelliJ IDEA在Gradle项目中只创建未对齐的APK? - Why does IntelliJ IDEA create only unaligned APK in Gradle projects? 在Ideatellij 14(OSX Yosemite)中获取Gradle项目的环境变量吗? - Get environment variables for Gradle projects in idea intellij 14 (OSX Yosemite)? 为什么 IntelliJ IDEA 2021.1 需要 gradle 项目的 Android SDK? - Why does IntelliJ IDEA 2021.1 require Android SDK for gradle projects?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM