# Installing Gradle

version 9.2.0-20250810004339+0000

If all you want to do is run an existing Gradle project, then you don’t need to install Gradle if the build uses the Gradle Wrapper.

## Gradle Installation

The Gradle Wrapper is identifiable by the presence of the `gradlew` or `gradlew.bat` files in the root of the project:

    .   (1)
    ├── gradle
    │   └── wrapper (2)
    ├── gradlew         (3)
    ├── gradlew.bat     (3)
    └── ⋮

1 | Project root directory.
2 | Gradle Wrapper.
3 | Scripts for executing Gradle builds.

If the `gradlew` or `gradlew.bat` files are already present in your project, you do not need to install Gradle. But you need to make sure your system satisfies Gradle’s prerequisites.

You can follow the steps in the Upgrading Gradle section if you want to update the Gradle version for your project. Please use the Gradle Wrapper to upgrade Gradle.

Android Studio comes with a working installation of Gradle, so you don’t need to install Gradle separately when only working within that IDE.

If you do not meet the criteria above and decide to install Gradle on your machine, first check if Gradle is already installed by running `gradle -v` in your terminal. If the command does not return anything, then Gradle is not installed, and you can follow the instructions below.

You can install Gradle Build Tool on Linux, macOS, or Windows. The installation can be done manually or using a package manager like SDKMAN! or Homebrew.

You can find all Gradle releases and their checksums on the releases page.

## Prerequisites

Gradle runs on all major operating systems. It requires Java Development Kit (JDK) version 17 or higher to run. You can check the compatibility matrix for more information.

To check, run `java -version`:

    ❯ java -version
    openjdk version "17.0.6" 2023-01-17
    OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10)
    OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode)

Gradle uses the JDK it finds in your path, the JDK used by your IDE, or the JDK specified in your project.

In this example, the $PATH points to JDK17:

    ❯ echo $PATH
    /opt/homebrew/opt/openjdk@17/bin

You can also set the `JAVA_HOME` environment variable to point to a specific JDK installation directory. This is especially useful when multiple JDKs are installed:

    ❯ echo %JAVA_HOME%
    C:\Program Files\Java\jdk17.0_6

    ❯ echo $JAVA_HOME
    /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home

Gradle supports Kotlin and Groovy as the main build languages. Gradle ships with its own Kotlin and Groovy libraries, therefore they do not need to be installed. Existing installations are ignored by Gradle.

See the full compatibility notes for Java, Groovy, Kotlin, and Android.

## Linux installation

Installing with a package manager

SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix-like systems (macOS, Linux, Cygwin, Solaris and FreeBSD). Gradle is deployed and maintained by SDKMAN!:

    ❯ sdk 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.

Installing manually

Step 1 - Download the latest Gradle distribution

The distribution ZIP file comes in two flavors:

- Binary-only (bin)

- Complete (all) with docs and sources

We recommend downloading the bin file; it is a smaller file that is quick to download (and the latest documentation is available online).

Step 2 - Unpack the distribution

Unzip the distribution zip file in the directory of your choosing, e.g.:

    ❯ mkdir /opt/gradle
    ❯ unzip -d /opt/gradle gradle-9.2.0-20250810004339+0000-bin.zip
    ❯ ls /opt/gradle/gradle-9.2.0-20250810004339+0000
    LICENSE  NOTICE  bin  README  init.d  lib  media

Step 3 - Configure your system environment

To install Gradle, the path to the unpacked files needs to be in your Path. Configure your `PATH` environment variable to include the `bin` directory of the unzipped distribution, e.g.:

    ❯ export PATH=$PATH:/opt/gradle/gradle-9.2.0-20250810004339+0000/bin

Alternatively, you could also add the environment variable `GRADLE_HOME` and point this to the unzipped distribution. Instead of adding a specific version of Gradle to your `PATH`, you can add `$GRADLE_HOME/bin` to your `PATH`. When upgrading to a different version of Gradle, simply change the `GRADLE_HOME` environment variable.

    export GRADLE_HOME=/opt/gradle/gradle-9.2.0-20250810004339+0000
    export PATH=${GRADLE_HOME}/bin:${PATH}

## macOS installation

Installing with a package manager

SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix-like systems (macOS, Linux, Cygwin, Solaris and FreeBSD). Gradle is deployed and maintained by SDKMAN!:

    ❯ sdk install gradle

Using Homebrew:

    ❯ brew install gradle

Using MacPorts:

    ❯ sudo port install gradle

Other package managers are available, but the version of Gradle distributed by them is not controlled by Gradle, Inc.

Installing manually

Step 1 - Download the latest Gradle distribution

The distribution ZIP file comes in two flavors:

- Binary-only (bin)

- Complete (all) with docs and sources

We recommend downloading the bin file; it is a smaller file that is quick to download (and the latest documentation is available online).

Step 2 - Unpack the distribution

Unzip the distribution zip file in the directory of your choosing, e.g.:

    ❯ mkdir /usr/local/gradle
    ❯ unzip gradle-9.2.0-20250810004339+0000-bin.zip -d /usr/local/gradle
    ❯ ls /usr/local/gradle/gradle-9.2.0-20250810004339+0000
    LICENSE	NOTICE	README	bin	init.d	lib

Step 3 - Configure your system environment

To install Gradle, the path to the unpacked files needs to be in your Path. Configure your `PATH` environment variable to include the `bin` directory of the unzipped distribution, e.g.:

    ❯ export PATH=$PATH:/usr/local/gradle/gradle-9.2.0-20250810004339+0000/bin

Alternatively, you could also add the environment variable `GRADLE_HOME` and point this to the unzipped distribution. Instead of adding a specific version of Gradle to your `PATH`, you can add `$GRADLE_HOME/bin` to your `PATH`. When upgrading to a different version of Gradle, simply change the `GRADLE_HOME` environment variable.

It’s a good idea to edit `.bash_profile` in your home directory to add `GRADLE_HOME` variable:

    export GRADLE_HOME=/usr/local/gradle/gradle-9.2.0-20250810004339+0000
    export PATH=$GRADLE_HOME/bin:$PATH

## Windows installation

Installing manually

Step 1 - Download the latest Gradle distribution

The distribution ZIP file comes in two flavors:

- Binary-only (bin)

- Complete (all) with docs and sources

We recommend downloading the bin file.

Step 2 - Unpack the distribution

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-9.2.0-20250810004339+0000` to your newly created `C:\Gradle` folder.

Alternatively, you can unpack the Gradle distribution ZIP into `C:\Gradle` using the archiver tool of your choice.

Step 3 - Configure your system environment

To install Gradle, the path to the unpacked files needs to be in your Path.

In File Explorer right-click on the `This PC` (or `Computer`) icon, then click `Properties` → `Advanced System Settings` → `Environmental Variables`.

Under `System Variables` select `Path`, then click `Edit`. Add an entry for `C:\Gradle\gradle-9.2.0-20250810004339+0000\bin`. Click `OK` to save.

Alternatively, you can add the environment variable `GRADLE_HOME` and point this to the unzipped distribution. Instead of adding a specific version of Gradle to your `Path`, you can add `%GRADLE_HOME%\bin` to your `Path`. When upgrading to a different version of Gradle, just change the `GRADLE_HOME` environment variable.

## Verify the installation

Open a console (or a Windows command prompt) and run `gradle -v` to run gradle and display the version, e.g.:

    ❯ gradle -v

    ------------------------------------------------------------
    Gradle 9.0.0
    ------------------------------------------------------------

    Build time:    2025-07-17 12:48:00 UTC
    Revision:      2db9560bb68c367a265b10516c856c840f9bed8d

    Kotlin:        2.2.0
    Groovy:        4.0.28
    Ant:           Apache Ant(TM) version 1.10.15 compiled on August 25 2024
    Launcher JVM:  17.0.11 (Amazon.com Inc. 17.0.11+9-LTS)
    Daemon JVM:    Compatible with Java 17, any vendor, nativeImageCapable=false (from gradle/gradle-daemon-jvm.properties)
    OS:            Mac OS X 14.7.4 aarch64

You can verify the integrity of the Gradle distribution by downloading the SHA-256 file (available from the releases page) and following these verification instructions.