How do I install Gradle in Mac OS X?


In this post we will learn how to install Gradle in Mac OS X. The following steps will guide our installation process to make Gradle available in our OS X machine.

Gradle is an open source build automation system that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the XML form used by Apache Maven of declaring the project configuration.

From: Wikipedia

Gradle installation steps:

Download Gradle

To download visit Gradle download page. Download the complete distribution which includes binaries, sources and offline documentation. When I write this post the latest release of Gradle is version 2.10 (

Upacking Gradle and Configure Environment Variables

  • Open
  • Create a new directory sudo mkdir /usr/local/gradle.
  • Extract the downloaded Gradle distribution archive by executing sudo unzip -d /usr/local/gradle.
  • Edit .bash_profile in your home directory to add GRADLE_HOME variable with the following line export GRADLE_HOME=/usr/local/gradle/gradle-2.10
  • Also update the PATH variable to include $GRADLE_HOME/bin. If you don’t already have the PATH variable add the following line export PATH=$GRADLE_HOME/bin:$PATH
  • Run source ~/.bash_profile to executes the update version of .bash_profile. Or you can open a new to make this changes active.

Running the Installation

To test Gradle installation open the and execute gradle -v command. If your installation was correct you will see something like the following output:

$ gradle -v

Gradle 2.10

Build time:   2015-12-21 21:15:04 UTC
Build number: none
Revision:     276bdcded730f53aa8c11b479986aafa58e124a6

Groovy:       2.4.4
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.8.0_20 (Oracle Corporation 25.20-b23)
OS:           Mac OS X 10.11.2 x86_64