Disable Gradle Daemon in Eclipse

Is there any way to disable the Gradle Daemon in Eclipse? I have tried setting org.gradle.daemon=false in gradle.properties (both in the root folder an in my user folder), via the GRADLE_OPTS environment variable and even via the eclipse.ini file. Nothing worked. Is it even possible?

Hello Christoph,
configuring these properties has no effect on the daemon usage in eclipse buildship. The gradle tooling api uses a daemon process to run the build and calculate the build model requested by BuildShip. There is no option / public api to run this in-process. Only for information about the BuildEnvironment no daemon is launched.

Can you elaborate about your use case?

cheers,
René

Hi René

Thank you for your quick answer.

My use case is a (corporate) 32-bit Windows machine that is simply running out of memory, also because a lot of other tools are alreay running on it. An upgrade to 64-bit Windows is planned, but till then it would be nice to have the option to turn of the daemon.

If all the properties have no effect on BuildShip, then there is also no way to restrict the memory usage of the daemon, right?

Cheers,
Christoph

[quote=“cbbaumann, post:3, topic:11503”]
If all the properties have no effect on BuildShip, then there is also no way to restrict the memory usage of the daemon, right?
[/quote] wrong :wink:
you can declare the memory settings for the daemon process. the most convenient way to do is in my opinion to declare the jvm arguments in a project specific gradle.properties file.

cheers,
René

Or you declare them in the Import Wizard (Options tab, JVM arguments) - depends on whether you want to share the setting across different users and Buildship/CLI.

I have set

org.gradle.jvmargs=-Xms256m -Xmx256m

in the gradle.properties file in my root project. And indeed JConsole confirms that the daemons max heap size is 256m.

Thank you for your help, guys!

1 Like

I came out here with a similar problem and setting the jvmargs. like you did, resolved it.

Thanks!