Skip to main content

Install Gradle on Mac

Published: 2019-10-11 • Last updated: 2021-05-03

This will install gradle version 6.8.3.

  1. Install Java version 8 or higher

  2. Download Gradle from the releases page

     curl -O -L https://downloads.gradle-dn.com/distributions/gradle-6.8.3-bin.zip
    
  3. Make dir then unzip it

     mkdir -p ~/bin/gradle
     unzip -d ~/bin/gradle gradle-6.8.3-bin.zip
    
  4. Set environment variables in your bash config file, e.g. ~/.bash_profile

     export GRADLE_HOME=$HOME/bin/gradle/gradle-6.8.3
     export PATH=$GRADLE_HOME/bin:$PATH
    
  5. Source bash config file

     source ~/.bash_profile
    
  6. Confirm installation

     gradle --version