如何在IntelliJ Idea中禁用Gradle守护进程? [英] How to disable Gradle daemon in IntelliJ Idea?

查看:1155
本文介绍了如何在IntelliJ Idea中禁用Gradle守护进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在IntelliJ Idea中禁用Gradle守护进程,因为Scala插件不能与守护进程一起工作(编译失败, NullPointerException )。
我试图编辑我的IntelliJ Gradle构建配置,以包含JVM系统参数 -Dorg.gradle.daemon = false





我还试着在同一地方使用 - no-daemon 标志(脚本参数和VM选项)。此外,我试图在首选项 - >中指定这些选项。 IntelliJ的Gradle 菜单。这些尝试都没有给出任何结果,守护进程继续启动,所以我必须第二次在运行/编译之前终止它。





根据〜/ .gradle / gradle.properties 中禁止显式守护进程.html#N10473rel =noreferrer> https://docs.gradle.org/current/userguide/gradle_daemon.html#N10473 没有任何影响。



如何禁用IntelliJ Idea中的Gradle守护程序用法? IntelliJ通过始终使用守护进程的Gradle工具API与Gradle进行交互。
即无法关闭它。



你可以做什么(在提交bug报告后)不是使用IntelliJ Gradle集成,而是生成IntelliJ项目文件与 gradle idea


I need to disable the Gradle daemon in IntelliJ Idea, because somehow Scala plugin is not working with the daemon (the compilation fails with NullPointerException). I have tried to edit my IntelliJ Gradle build configurations to include a JVM system parameter -Dorg.gradle.daemon=false:

Also I've tried to use --no-daemon flag at the same place (Script parameters and VM options). Also I've tried to specify these options in the Preferences -> Gradle menu of IntelliJ. None of these attempts gave any result, the daemon continue to start, so I have to kill it before running/compiling for the second time.

Neither disabling daemon explicit in ~/.gradle/gradle.properties according to https://docs.gradle.org/current/userguide/gradle_daemon.html#N10473 doesn't have any effect.

How can I disable the Gradle daemon usage in IntelliJ Idea?

解决方案

IntelliJ interacts with Gradle via the Gradle tooling API, which always uses the daemon. i.e. There is no way to turn it off.

What you could do (after filing a bug report) is not to use the IntelliJ Gradle integration but instead generate IntelliJ project files with gradle idea.

这篇关于如何在IntelliJ Idea中禁用Gradle守护进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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