Installing Gradle
On Linux (Ubuntu/Debian)
- Install
Gradle using APT:
bash
sudo apt update
sudo apt install gradle
- Verify
Installation:
bash
gradle -v
- 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
- Download
Gradle:
- Visit
the Gradle download page and download the binary .zip file.
- Extract
Gradle:
- Extract
the archive to a directory (e.g., C:\Program Files\Gradle).
- 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
- Verify
Installation: Open a new terminal and run:
bash
gradle -v
On macOS
- Install
Gradle with Homebrew:
bash
brew install gradle
- Verify
Installation:
bash
gradle -v
No comments:
Post a Comment