You can retrieve the path for GRADLE_HOME
automatically using the following snippet in your .bashrc
or .zshrc
:
export GRADLE_HOME=$(brew info gradle | grep /usr/local/Cellar/gradle | awk '{print $1}')
This is handy when the path to Gradle's home changes, when Gradle is updated.