Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Distributions»Fedora»How To Install Gradle on Fedora 36/35/34

    How To Install Gradle on Fedora 36/35/34

    By RahulSeptember 8, 20223 Mins Read

    Gradle is a powerful build tool that supports multiple popular programming languages and technologies. It is also an official build tool for Android. Gradle is a highly customized and extensible tool in most fundamental ways. It is an open-source build tool for the automation of applications.

    Advertisement

    This tutorial will help you to install Gradle on Fedora 36/35/34/33/32 operating system.

    • How to Install Maven on Fedora

    Prerequisites

    The Gradle requires Java 8 or higher version installed on the system. Generally, the Fedora system has a default installed Java version on it. to run Java 8 or higher version. You can use the following command to install java if you don’t already have it.

    sudo dnf install java-11-openjdk 
    

    Verify the installed Java version on your system.

    java -version 
    
    openjdk version "11.0.11" 2021-04-20
    OpenJDK Runtime Environment 18.9 (build 11.0.11+9)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.11+9, mixed mode, sharing)
    

    After that install some more packages used in this tutorial.

    sudo dnf install unzip wget -y 
    

    Install Gradle on Fedora

    Once you installed Java on your system. Download the latest Gradle distribution release binary file from its official download page. You can also use the wget command to download the file.

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

    Then extract the downloaded archive and place it in the proper location. Generally, I use /usr/local directory for storing applications. You can use an alternative directory like /opt.

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

    Gradle has been configured on your system.

    Setup Environment Variable

    Now, you need to set up Gradle with a PATH environment variable, Also make sure the variable is set after the system reboot.

    Place a shell script under the profile.d directory to set the PATH variable on reboot. Create a file like the below:

    sudo nano /etc/profile.d/gradle.sh 
    

    Add the below configuration to the file

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

    Save the file and close it. Now source the script to apply the environment for the current shell.

    source /etc/profile.d/gradle.sh 
    

    All done, you have done the Grandle installation on your Fedora system.

    Check Gradle Version

    Once you finished the Gradle installation, let’s check the installed version on your system.

    gradle --version 
    

    Output

    Welcome to Gradle 7.0!
    
    Here are the highlights of this release:
     - File system watching enabled by default
     - Support for running with and building Java 16 projects
     - Native support for Apple Silicon processors
     - Dependency catalog feature preview
    
    For more details see https://docs.gradle.org/7.0/release-notes.html
    
    
    ------------------------------------------------------------
    Gradle 7.0
    ------------------------------------------------------------
    
    Build time:   2021-04-09 22:27:31 UTC
    Revision:     d5661e3f0e07a8caff705f1badf79fb5df8022c4
    
    Kotlin:       1.4.31
    Groovy:       3.0.7
    Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
    JVM:          11.0.11 (Red Hat, Inc. 11.0.11+9)
    OS:           Linux 5.8.15-301.fc33.x86_64 amd64
    

    You will see the results like above. It means Gradle is properly installed on your Fedora system. Next, you may also need Apache Maven on your system.

    Build Tool Gradle
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Upgrade to Fedora 28

    Upgrade Fedora: A Step-by-Step Tutorial

    How To Install Apache Solr on Fedora

    How To Install Apache Solr on Fedora

    How to Install PowerShell on Fedora

    How to Install PowerShell on Fedora

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • A Comprehensive Look at the Simple Mail Transfer Protocol (SMTP)
    • Understanding Basic Git Workflow: Add, Commit, Push
    • The Difference Between Git Reset –soft, –mixed, and –hard
    • Understanding the Staging Area in Git’s Workflow
    • Python Function with Parameters, Return and Data Types
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.