Skip to main content

How To Install Gradle on Debian 11 / Debian 10


Gradle is an open-source tool for build automation Java, Groovy, and Scala development. It relies on the concepts of Ant and Maven to automate the building process.

Unlike Apache Maven which relies on XML data files for declaring project configurations, Gradle uses Groovy, a dynamic programming language that defines project configurations.

In this post, we will install Gradle on Debian 11 / Debian 10.

Install JDK

Gradle's only requirement is Java JDK version 8 or higher. So, install either OpenJDK or Oracle JDK.

Here, for the demo, we will use OpenJDK v11.
sudo apt update sudo apt install -y default-jdk

Verify the Java installation by executing the following command.
java -version

Output:
openjdk version "11.0.12" 2021-07-20 OpenJDK Runtime Environment (build 11.0.12+7-post-Debian-2) OpenJDK 64-Bit Server VM (build 11.0.12+7-post-Debian-2, mixed mode, sharing)

Install other required packages.
sudo apt install -y curl unzip

Install Gradle

Download the latest version of the Gradle (v7.2) –  Binary-only zip file from the official site.

OR

Use the below command in the terminal to download the Gradle (v7.2) package.
cd /tmp curl -O https://downloads.gradle-dn.com/distributions/gradle-7.2-bin.zip

Then, extract the package using the unzip command.
unzip gradle-*.zip

Move the contents to /opt/gradle directory.
sudo mkdir /opt/gradle sudo cp -pr gradle-*/* /opt/gradle

Verify the Gradle's directory.
ls /opt/gradle/

Output:

bin  init.d  lib  LICENSE  NOTICE  README

Configure System Environment

We will now configure the PATH environment variable to include Gradle's bin directory. To do that, execute the below command. If needed, replace the Gradle's bin path with your Gradle's directory.
echo "export PATH=/opt/gradle/bin:${PATH}" | sudo tee /etc/profile.d/gradle.sh

Make the script executable with chmod command.
sudo chmod +x /etc/profile.d/gradle.sh

Load the environment variables onto your current session by running 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 7.2! Here are the highlights of this release: - Toolchain support for Scala - More cache hits when Java source files have platform-specific line endings - More resilient remote HTTP build cache behavior For more details see https://docs.gradle.org/7.2/release-notes.html ------------------------------------------------------------ Gradle 7.2 ------------------------------------------------------------ Build time:   2021-08-17 09:59:03 UTC Revision:     a773786b58bb28710e3dc96c4d1a7063628952ad Kotlin:       1.5.21 Groovy:       3.0.8 Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM:          11.0.12 (Debian 11.0.12+7-post-Debian-2) OS:           Linux 5.10.0-8-amd64 amd64 

Sumber: disini

Comments

Popular posts from this blog

Cara Disable Antimalware Service Executable di Windows 10

Disadari atau tidak, Windows 10 (dan juga windows-windows lainnya) hadir dengan banyak sekali aplikasi bloatware (aplikasi yang tidak perlu-perlu amat dimiliki oleh end user). Contohnya, adalah aplikasi yang seharusnya sudah tergantikan fungsinya oleh antivirus, seperti Antimalware Service Executable . Aplikasi ini dicurigai membuat Windows 10 mengalami inefisiensi memori/RAM, memakan resource yang tinggi, dengan Load yang tinggi (tanpa limit terkadang). Nah, berikut adalah cara men-disable nya: Tekan tombol Windows + I untuk membuka apliaksi Windows Setting. Pilih icon menu Update and Security Pilih lagi menu disamping kiri Windows Security Pada jendela baru yang muncul, ada pilihan Virus & Threat protection Klik ini Lalu matikan proses Real-time protection tersebut. Dengan Regedit. Buka dialog regedit, Windows + R dan ketik ‘regedit’ Cari Folder regedit ini HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Buat sebuah DWORD baru dengan klik kanan

Setup Debian 11 Official Repository In sources.list (/etc/apt/sources.list)

When you install Debian 11 using a DVD, the OS installer sets the DVD as the source for getting packages for your system if you didn't choose to scan for network mirrors. Due to this reason, the system would ask you to insert a DVD if the disc is not present in the DVD drive when you try to install any software.  Also, the packages on DVD may not be the latest release.  So, we need to get the packages from the Internet. Media change: please insert the disc labeled 'Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04' in the drive '/media/cdrom/' and press [Enter] The /etc/apt/sources.list file with DVD as a source would look something like below. # deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main deb http://security.debian.org/debian-security bullseye-security

Cara Berlangganan ke Akun OnlyFans

Ada dua jenis akun di OnlyFans: akun pengguna dan akun pembuat konten. Jika Anda berlangganan akun OnlyFans, maka Anda adalah pengguna. Sementara beberapa akun pembuat OnlyFans tidak mengenakan biaya untuk melihat konten mereka, yang lain dapat mengenakan biaya bulanan $50. Dalam artikel ini, kami akan menunjukkan cara berlangganan akun OnlyFans di berbagai perangkat. Kami juga akan membahas proses berlangganan akun OnlyFans tanpa kartu kredit atau debit. Cara Berlangganan Akun OnlyFans Tanpa Menggunakan Kartu Kredit Pribadi Anda Sebagai salah satu platform paling populer di industri hiburan dewasa, OnlyFans memiliki 130 juta pelanggan dan 2 juta kreator. Meskipun ada sedikit kontroversi seputar aplikasi ini, ada akun pengguna baru yang dibuat setiap hari. Jika Anda ingin membuat akun pengguna, Anda harus melakukannya di situs OnlyFans. Ingatlah bahwa Anda harus berusia minimal 18 tahun untuk membuat akun OnlyFans.