Tuesday, 3 December 2024

Installing Gradle

 

Installing Gradle

On Linux (Ubuntu/Debian)

  1. Install Gradle using APT:

bash

 

sudo apt update

sudo apt install gradle

  1. Verify Installation:

bash

 

gradle -v

  1. Manual Installation (Optional):
    • Download Gradle from the Gradle Download Page.
    • Extract the archive:

bash

 

unzip gradle-X.X.X-bin.zip

    • Move it to /opt:

bash

 

sudo mv gradle-X.X.X /opt/gradle

    • Add Gradle to your PATH:

bash

 

echo 'export PATH=/opt/gradle/bin:$PATH' >> ~/.bashrc

source ~/.bashrc


On Windows

  1. Download Gradle:
    • Visit the Gradle download page and download the binary .zip file.
  2. Extract Gradle:
    • Extract the archive to a directory (e.g., C:\Program Files\Gradle).
  3. Set Environment Variables:
    • Go to Control Panel > System > Advanced System Settings > Environment Variables.
    • Add a new system variable:
      • Name: GRADLE_HOME
      • Value: C:\Program Files\Gradle
    • Edit the Path variable and add:

plaintext

 

C:\Program Files\Gradle\bin

  1. Verify Installation: Open a new terminal and run:

bash

 

gradle -v


On macOS

  1. Install Gradle with Homebrew:

bash

 

brew install gradle

  1. Verify Installation:

bash

 

gradle -v

 

No comments:

Post a Comment