Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 967
Anatoliy Kmetyuk Avatar asked Aug 21 '14 08:08

Anatoliy Kmetyuk


People also ask

How do I stop Gradle Daemon in IntelliJ?

IntelliJ interacts with Gradle via the Gradle tooling API, which always uses the daemon. i.e. There is no way to turn it off. "gradle idea" is needed only to generate the required files. Though the recent versions of Idea use "directory-based" project structure, so the file generation is no longer necessary.

How do I enable Gradle Daemon?

To enable the Daemon for a single build, you can simply pass the --daemon argument to your gradle command or Gradle Wrapper script. To your project's gradle. properties file. You can disable the Daemon for a specific build using the --no-daemon argument, or disable it for a specific project by explicitly setting org.

How do I stop Gradle instances?

You can check by running command gradle --stop . You would expect to either get output No Gradle daemons are running or Gradle daemon stopped.

How do I know if Gradle Daemon is running?

How can I find out if the gradle daemon is running? Running in terminal gradle --status will give the status of the gradle. You'll see "No Gradle daemons are running" message if there's no gradle daemon running. Otherwise, you'll see status of the daemon.


1 Answers

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

like image 54
Peter Niederwieser Avatar answered Sep 23 '22 23:09

Peter Niederwieser