How To Install Gradle on Debian 10 / Debian 9 Apr 21, 2020 Raj 3 min read CONTENTS Install JDK/JRE Install Gradle Setup environment variables Verify Gradle installation Conclusion SHARE THIS DOCUMENT IS ALSO AVAILABLE FOR CentOS 8 CentOS 7 Ubuntu 18.04 Ubuntu 16.04 Gradle is an open-source build automation tool used for compiling, running, testing applications and much more. Build scripts are written in Groovy or Kotlin. It uses Apache Ant and Apache Maven’s build concepts for automating the build. Initially, Gradle was used mainly for Java, Groovy, and Scala development and deployment. But, it is now used for Android, Kotlin, and other popular technologies. In this post, we will see how to install Gradle on Debian 10 & Debian 9. Install JDK/JRE Gradle requires Java JDK or JRE version 8 or above to be available on the system. If you prefer Oracle Java JDK, then: READ: How To Install Oracle Java on Debian 10 / Debian 9 Here, I will use OpenJDK 8 for this tutorial. You are free to use any version above OpenJDK 8. Update the repository index. sudo apt update Install the OpenJDK package using the apt command. sudo apt install -y openjdk-8-jdk-headless OR sudo apt install -y default-jdk Verify the Java installation with the following command. java -version Output: openjdk version "1.8.0_242" OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-1~deb9u1-b08) OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode) Install other required packages. sudo apt install -y wget unzip Install Gradle Download the latest version of the Gradle package (v6.3) from the official site. We will use the Gradle Binary-only zip file for the installation. OR Use the below command in terminal to download Gradle (version 6.3). cd /tmp wget https://services.gradle.org/distributions/gradle-6.3-bin.zip Unzip the Gradle package using unzip command and move unzipped files to /opt/gradle directory. unzip gradle-*.zip sudo mkdir /opt/gradle sudo cp -pr gradle-*/* /opt/gradle Verify the unzipped files by listing the /opt/gradle/ directory. ls /opt/gradle/ Output: LICENSE NOTICE bin getting-started.html init.d lib media Setup environment variables Now, we will configure the PATH environment variable to include the Gradle’s bin (executable) directory. To do that, create a new file called gradle.sh inside the /etc/profile.d/ directory to export the PATH variable. echo "export PATH=/opt/gradle/bin:${PATH}" | sudo tee /etc/profile.d/gradle.sh Make the script executable using the chmod command. sudo chmod +x /etc/profile.d/gradle.sh Load the environment variables for the current session by using the following command. source /etc/profile.d/gradle.sh Verify Gradle installation To validate the Gradle installation, use the below command. gradle -v Output: Welcome to Gradle 6.3! Here are the highlights of this release: - Java 14 support - Improved error messages for unexpected failures For more details see https://docs.gradle.org/6.3/release-notes.html ------------------------------------------------------------ Gradle 6.3 ------------------------------------------------------------ Build time: 2020-03-24 19:52:07 UTC Revision: bacd40b727b0130eeac8855ae3f9fd9a0b207c60 Kotlin: 1.3.70 Groovy: 2.5.10 Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019 JVM: 1.8.0_242 (Oracle Corporation 25.242-b08) OS: Linux 4.9.0-11-amd64 amd64 Conclusion That’s All. You have successfully installed Gradle on Debian 10 / Debian 9. You can go to the official Gradle documentation page to get started with Gradle. debian-10 debian-9 gradle build devops-tools Prev Post How To Install IntelliJ IDEA On Debian 10 / Debian 9 Next Post How To Install Ubuntu 20.04 LTS (Focal Fossa) On UEFI and Legacy BIOS System RELATED POSTS How To Install IntelliJ IDEA On Debian 10 / Debian 9 How To Install Apache Tomcat on Debian 10 / Debian 9 How To Install Ruby on Rails on Debian 10 / Debian 9 How To Install Apache Maven on Debian 10 / Debian 9 How To Install Node.js on Debian 10 / Debian 9 How To Install Gradle on CentOS 8 / 7 & RHEL 8 / 7 Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus RECENT POSTS How To Install VirtualBox On Linux Mint 20 How To Backup and Restore Ubuntu & Linux Mint With Timeshift How To Upgrade To Linux Mint 20 From Linux Mint 19 [Detailed Guide] How To Install KVM On Ubuntu 20.04 / Linux Mint 20 How To Install Plex Media Server On Ubuntu 20.04 / Linux Mint 20 How To Install Android Studio on Ubuntu 20.04 TOP POSTS Install xrdp on CentOS 7 / RHEL 7 Install Gnome GUI on CentOS 7 / RHEL 7 Change default network name (ens33) to old “eth0” on Ubuntu… Install μTorrent (uTorrent) on Ubuntu 14.04 How To Configure High-Availability Cluster on CentOS 7 /… How To Install and Configure VNC Server in CentOS 7 / RHEL 7