Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use/start the gradle daemon on a Mac?

Every time I execute a gradle command on Mac I get a message saying:

"This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.10/userguide/gradle_daemon.html"

I've created a gradle.properties file with the line org.gradle.daemon=true as mentioned in the web page given in the message. However no matter what I do, I still continue to get that message.

If I execute the command

gradle --daemon

then it executes successfully, but still next time I do something I get that message about it could be faster and builds are just as slow as before I started the daemon.

My installation directory is no /Users/username as in gradle_daemon.html as I'm falling a Udacity course (https://www.udacity.com/course/viewer#!/c-ud867/) and they recommend installing it to /usr/local/gradle

How can I actually get the gradle dameon to work and get rid of that could be faster message?

(Using Gradle version 2.10)

like image 909
Gruntcakes Avatar asked Jan 11 '16 17:01

Gruntcakes


People also ask

How do I start the 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 open the gradle folder on a Mac?

Open Preferences -> Build, Execution, Deployment -> Gradle . Select Use local gradle distribution and specify Gradle home . On Mac: /usr/local/opt/gradle/libexec in case you installed it via brew .

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.


2 Answers

just put

org.gradle.daemon=true

in the ~/.gradle/gradle.properties file. Then each build on your machine will use the gradle wrapper and the message dissapears.

like image 128
Rene Groeschke Avatar answered Oct 12 '22 01:10

Rene Groeschke


The page doesn't say anywhere that gradle must be installed in /Users/username. It says that this directory is your home directory, and that's where the .gradle/gradle.properties file must be located. The place where gradle is installed is irrelevant.

like image 34
JB Nizet Avatar answered Oct 12 '22 02:10

JB Nizet