Gradle home cannot be found on Mac : <p>I've installed <code>gradle</code> on MAC using terminal.</p>

<p><code>brew install gradle</code></p>

<p>Gradle has been installed successfully.</p>

<pre><code>gradle -v

------------------------------------------------------------
Gradle 3.3
------------------------------------------------------------

Build time:   2017-01-03 15:31:04 UTC
Revision:     075893a3d0798c0c1f322899b41ceca82e4e134b

Groovy:       2.4.7
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_112 (Oracle Corporation 25.112-b16)
OS:           Mac OS X 10.12.3 x86_64
</code></pre>

<p>but I can not find gradle home.</p>

<pre><code>echo $GRADLE_HOME
[empty result]
</code></pre>

<p>the first step to determine home directory is detect location of <code>gradle</code> instruction:</p>

<pre><code>which gradle
/usr/local/bin/gradle
</code></pre>

<p>there is incomprehensible bash file.</p>

<hr>

<p>Any ideas how to detect gradle home directory via terminal?</p>
