Gradle is a Build Automation Toolset, Often Used to Install BigData Tools Related to Hadoop. Our one reader probably faced trouble managing Gradle’s way mentioned on our earlier one guide (we skipped the details on installation of Gradle). We guess many readers will find the same issue. Here is How to Install Gradle on Ubuntu 18.04 on Cloud Server.
This is official website of Gradle :
1 | https://gradle.org/ |
Gradle probably prefer SDKMAN to install (which is a kind of package manager). We will show how to install from binary. There is no special problem to use SDKMAN, we think that binary download is possible what most users will feel comfortable.
---
How to Install Gradle on Ubuntu 18.04
Before installing the needed packages, update the system as root
user :
1 | apt update -y && apt upgrade -y |
Installing Gradle demands Java Development Kit (JDK) 7 as minimum need. We will install JDK 8 and other dependencies :
1 | apt install openjdk-8-jdk wget unzip -y |
If you run this command :
1 | java -version |
You’ll get this kind of output :
1 2 3 | openjdk version "1.8.0_121" OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.10.2-b13) OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode) |
Indicating that installation is fine. Here is official page of Gradle releases :
1 | https://gradle.org/releases |
We need binary. Latest version at the time of writing is 4.8. You should manually check which version is current and install that in this way :
1 2 3 4 5 6 7 | sudo mkdir /opt/gradle cd /opt/gradle wget https://services.gradle.org/distributions/gradle-4.8-bin.zip ls -al sudo unzip -d /opt/gradle gradle-4.8-bin.zip ls -al rm gradle-4.8-bin.zip |
Now, we need to configure the PATH
. We can do by running this command :
1 | export PATH=$PATH:/opt/gradle/gradle-4.8/bin |
Reboot the server. Now, if you run :
1 | gradle -v |
You’ll get an output indicating Gradle is installed.
Gradle on MacOS X
Formula available for Homebrew to quickly build it :
1 | brew install gradle |
Gradle on Microsoft Windows Ubuntu Bash
Same steps like we have shown for Ubuntu 18.04 LTS.
Tagged With ubuntu 18 04 install gradle , installed gradle as root on VM , https://thecustomizewindows com/2018/06/how-to-install-gradle-on-ubuntu-18-04-build-automation-toolset/ , how to install gradle on ubuntu 18 , how to install gradle in windows ubuntu , how to install gradle in ubuntu , how to get the gradle path in ubuntu , how to download gradle to VM , gradle installation for ubuntu 18 4 , gradle install ubuntu 18 04 lts