Change the Better World

How to install Gradle? 본문

Build Automation/Gradle

How to install Gradle?

white_cheetah 2022. 9. 25. 18:35

You can install the Gradle build tool on Linux, macOS, or Windows.

Prerequisite is JDK which is Java Development Kit version 8 or higer than to run

To check, run java -version like below

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

There are two ways to install gradle

1. sdk install gradle
 - If you had SDKMAN which is a tool for managing parallel versions of multiple Software Development Kits on most Unix-like system(macOS, Linux, Cygwin, Solaris and FreeBSD).
2. brew install gradle
  - If you isntalled Homebrew which is the missing package manager for macOS.

After finishing this task, now we can check the version of gradle

> gradle -v
-----------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------

(environment specific information)
Comments