This article will teach you How to Setup and Configure Gradle on Fedora 33 Linux VPS. The process of building Android projects is managed by the Gradle build system. Android projects are offered in two different types, the first set of projects uses the legacy project structure, which is used by the equipment and tools of Android programming (ADT tooling) Eclipse. This type of project was used until 2013. But the second set of projects uses the Gradle Build Structure programming structure.

Setup and Configure Gradle on Fedora 33

We want to introduce you to Gradle. Then we will mention some Gradle features for you. We will then explain the prerequisites to install Gradle on Fedora 33. Finally, we will teach you step by step how to Setup and Configure Gradle on Fedora 33. Please stay tuned for the rest of this article.

What is Gradle?

Gradle is an open-source powerful build for Android and supports several popular languages and programming technologies. If you create a new project in Android Studio, your Gradle build script will be created automatically. Android Studio environment wraps Gradle runtime. Therefore, no additional installation is required. You can also use a wrapper script created by Gradle that allows the programmer to run a Gradle build without the need for additional installation from the command line.

Gradle Features

The Gradle build system is designed to support complex scenarios in the process of creating Android applications, such as:

Multi-distribution: The time required to create and configure a program for several different clients and custom companies.

Multi-apk: When it is necessary to be designed several different applications or applications for different Android devices and at the same time the produced programs use the same parts of the same code.

Prerequisites to Install Gradle on Fedora 33

Gradle requires Java version 8 or higher on the system as a prerequisite. If you do not already have this version of Java on your system, you can run Java 8 or higher version by entering the following command:

sudo dnf install java-1.8.0-openjdk

Use the following command to verify the Java version installed on your system:

java -version

To install other packages used in this tutorial, run the following command:

sudo dnf install unzip wget

How to Setup Gradle on Fedora 33

In this section, we want to teach you How to Setup Gradle on Fedora 33. Follow the steps below.

In the first step, to download Gradle, you can use Gradle official download page or enter the following command:

wget https://downloads.gradle-dn.com/distributions/gradle-6.3-bin.zip

Now you need to extract the downloaded file and put it in your desired location. For example, the following command uses the /usr/local directory to save the downloaded application:

unzip gradle-6.3-bin.zip
sudo mv gradle-6.3 /usr/local/gradle

How to Configure Gradle on Fedora 33

After you were able to successfully How to Setup Gradle on Fedora 33 in the previous section, now we want to teach you step by step in this section How to Configure Gradle on Fedora 33. Now it’s time to configure Gradle with the PATH environment variable. Make sure the variable is set after rebooting.

Enter the following command to place the shell script under the profile.d directory to set the PATH variable:

vim /etc/profile.d/gradle.sh

Add the following line to the created file:

export PATH=/usr/local/gradle/bin:$PATH

Finally, save the file and close it.

To source the script to apply the environment to the current shell, just enter the following command:

source /etc/profile.d/gradle.sh

Gradle is installed on your Fedora system.

Enter the following command to check the installed version of Gradle:

gradle --version

The output will be as follows:

 

how to check the installed version of Gradle

 

The output indicates that the Gradle is installed correctly on your system.

Conclusion

Although most Gradle users are Android developers, Gradle can be used as a build system in a variety of PHP, Java, Kotlin, C#, C++, Groovy, and even java-script projects. In this article, Gradle is fully introduced. In the continuation of the article, how to setup and configure Gradle in Fedora 33 is taught. You can easily install Gradle on your Fedora 33 system with this step-by-step tutorial.