9

I have a problem with the Gradle daemon not showing println output from my plugin on subsequent runs.

I can workaround this problem by adding --no-daemon when I run from the command line.

When I run the Gradle task from IDEA though, when I add --no-daemon to the "script parameters" (not the "VM options"), the execution fails with:

10:59:32: Executing external task 'lambdaGet --no-daemon'...
Unknown command-line option '--no-daemon'.

How can I use the --no-daemon option with Gradle task configuration in IDEA?

EDIT:

Note that this question is specifically about how to do this in IDEA. I don't want to disable the daemon globally, just from one specific IDEA run configuration.

Shorn
  • 19,077
  • 15
  • 90
  • 168

2 Answers2

1

You can add org.gradle.daemon=false to your global gradle.properties file.

On Windows, you can create it in

C:\Users\Username\.gradle\gradle.properties

mallaudin
  • 4,744
  • 3
  • 36
  • 68
1

did you try setting

org.gradle.daemon=false

in the gradle.properties in your .gradle directory

on my machine that folder is just under my home directory so the file is at /Users/fred/.gradle/gradle.properties

Frederic Close
  • 9,389
  • 6
  • 56
  • 67
  • 3
    I don't want to do that because it would disable all usage of the daemon, I only want to disable the daemon when I run this one specific task. – Shorn Jan 16 '17 at 04:37
  • This seems to have worked for me to disable the daemon within a single IntelliJ run configuration: https://stackoverflow.com/a/69106423/2434726 – scottysseus Sep 08 '21 at 16:09
  • Doesn't work. This file is present and command line gradle listens to it, but IntelliJ still starts a daemon. – Jorn Apr 15 '22 at 14:17