How to install Gradle on Mac/Windows

December 24, 2018

                Gradle requires Java JDK or JRE version 7. Please check your java version before you setup gradle. Check the java version using below command.

To install Gradle build tool manually, follow the below steps.

Step 1. Check Java Version

 java --version

 java 10.0.1 2018-04-17

Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)

Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

Step 2. Download the required Gradle version

For Mac & Linux Users, download the gradle distribution into /opt/gradle (This can be a user defined directory). For Windows Users, unzip the gradle distribution to C:\Gradle

Download the zip -

$ mkdir /opt/gradle

$ unzip -d /opt/gradle

$ ls /opt/gradle/gradle-4.10.2

Step 3. Configure Environment Variables

For Mac & Linux Users, change your PATH environment variable to include the bin directory of the unzipped distribution

   export PATH=$PATH:/opt/gradle/gradle-4.10.2/bin

In Windows, use  Computer-> Properties -> Advanced System Settings -> Environmental Variables to open the System Variables. Under System Variables select Path, then click Edit. Add an entry for C:\Gradle\gradle-4.10.2\bin and save 

Step 4. Check your installation

Open a terminal(Windows or Mac/Linux) and run the below command

   gradle -v

   Gradle 4.10.2


© DevClassRoom

  • Facebook Black Round
  • Google+ - Black Circle
  • Twitter Black Round