You can install the Gradle build tool on Linux, macOS, or Windows. This document covers installing using a package manager like SDKMAN! or Homebrew, as well as manual installation.
Use of the Gradle Wrapper is the recommended way to upgrade Gradle.
You can find all releases and their checksums on the releases page.
Gradle runs on all major operating systems and requires only a Java Development Kit version 8 or higher to run. To check, run
java -version. You should see something like this:
❯ java -version java version "1.8.0_151" Java(TM) SE Runtime Environment (build 1.8.0_151-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
Gradle ships with its own Groovy library, therefore Groovy does not need to be installed. Any existing Groovy installation is ignored by Gradle.
Gradle uses whatever JDK it finds in your path. Alternatively, you can set the
JAVA_HOME environment variable to point to the installation directory of the desired JDK.
SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix-like systems (macOS, Linux, Cygwin, Solaris and FreeBSD). We deploy and maintain the versions available from SDKMAN!.
❯ sdk install gradle
Homebrew is "the missing package manager for macOS".
❯ brew install gradle
Other package managers are available, but the version of Gradle distributed by them is not controlled by Gradle, Inc. Linux package managers may distribute a modified version of Gradle that is incompatible or incomplete when compared to the official version (available from SDKMAN! or below).
The distribution ZIP file comes in two flavors:
Complete (all) with docs and sources
Need to work with an older version? See the releases page.
Unzip the distribution zip file in the directory of your choosing, e.g.:
❯ mkdir /opt/gradle ❯ unzip -d /opt/gradle gradle-5.3-bin.zip ❯ ls /opt/gradle/gradle-5.3 LICENSE NOTICE bin getting-started.html init.d lib media
Create a new directory
C:\Gradle with File Explorer.
Open a second File Explorer window and go to the directory where the Gradle distribution was downloaded. Double-click the ZIP archive to expose the content. Drag the content folder
gradle-5.3 to your newly created
Alternatively you can unpack the Gradle distribution ZIP into
C:\Gradle using an archiver tool of your choice.
For running Gradle, firstly add the environment variable
GRADLE_HOME. This should point to the unpacked files from the Gradle website. Next add
GRADLE_HOME/bin to your
PATH environment variable. Usually, this is sufficient to run Gradle.
PATH environment variable to include the
bin directory of the unzipped distribution, e.g.:
❯ export PATH=$PATH:/opt/gradle/gradle-5.3/bin
In File Explorer right-click on the
This PC (or
Computer) icon, then click
Advanced System Settings →
System Variables select
Path, then click
Edit. Add an entry for
C:\Gradle\gradle-5.3\bin. Click OK to save.
Open a console (or a Windows command prompt) and run
gradle -v to run gradle and display the version, e.g.:
❯ gradle -v ------------------------------------------------------------ Gradle 5.3 ------------------------------------------------------------ (environment specific information)
If you run into any trouble, see the section on troubleshooting installation.
Now that you have Gradle installed, use these resources for getting started:
Create your first Gradle project by following the Creating New Gradle Builds tutorial.
Sign up for a live introductory Gradle training with a core engineer.
Learn how to achieve common tasks through the command-line interface.
Configure Gradle execution, such as use of an HTTP proxy for downloading dependencies.
Subscribe to the Gradle Newsletter for monthly release and community updates.