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. "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.
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.
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 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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With