Install Gradle on Mac
Published: 2019-10-11 • Last updated: 2019-10-19
-
Install Java, version 8 or higher
-
Download Gradle from the releases page. We’ll use
v5.6.2
in this examplecurl -O -L https://downloads.gradle-dn.com/distributions/gradle-5.6.2-bin.zip
-
Make dir then unzip it
mkdir -p ~/bin/gradle unzip -d ~/bin/gradle gradle-5.6.2-bin.zip
-
Set environment variables in your bash config file, e.g.
~/.bash_profile
export GRADLE_HOME=$HOME/bin/gradle/gradle-5.6.2 export PATH=$GRADLE_HOME/bin:$PATH
-
Source bash config file
source ~/.bash_profile
-
Confirm installation
gradle --version