Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
502 views
in Technique[技术] by (71.8m points)

java - How to disable Gradle daemon in IntelliJ 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:

enter image description here

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.

enter image description here

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...