I installed Gradle using MacPorts and now I am unable to find where the Gradle home is. For example Eclipse asks me for the location and I have no idea:
I tried specifying the path obtained from which gradle
:
$ which gradle
/opt/local/bin/gradle
But it does not work. So, where is the Gradle home?
It turns out that MacPorts tells you the Gradle home when installing / upgrading Gradle. The installation log ends with the following:
---> Some of the ports you installed have notes:
gradle has the following notes:
Remember to set the environment variable GRADLE_HOME
to the path to the gradle distribution:
/opt/local/share/java/gradle
So the correct Gradle home in that case is:
/opt/local/share/java/gradle
And this works in the Eclipse scenario mentioned above.