...
Panel | ||||
---|---|---|---|---|
| ||||
|
Installation
Please refer to the official Gradle Installation guide. The important things to keep in mind are:
- Make sure you understand how to upgrade to the latest version.
- Install the source code too. This will allow your IDE to help you more.
- Know where Gradle is installed. Specifically, know the path of the "home" directory. (The one that contains the
bin
,lib
andsrc
folders.) You need to paste this into your IDE configuration. - Have a command line environment in which you can invoke
gradle -version
.- If you have manually installed Gradle, this means you will need to add
<gradle_home>/bin
to yourPATH
or placing a symbolic link somewhere in the system path.
- If you have manually installed Gradle, this means you will need to add
Manual Installation
If you are unsatisfied with the recommended installation methods, you may choose to install Gradle manually. Reasons for this are:
- You are on Windows and are unsatisfied with Chocolately.
- You are on Ubuntu and the system provided Gradle package is out-of-date.
- You don't want to learn how to use SDKMAN!, Homebrew, or Chocolately.
Manual installation steps:
- Download an
*-all
or "complete" distribution zip from https://services.gradle.org/distributions/ or https://gradle.org/releases/- Make sure the zip file contains
bin
andsrc
- Make sure the zip file contains
- Unzip the distribution
- Linux command:
unzip gradle.zip -d gradle
- Linux command:
- Copy the distribution to a suitable system directory.
- Windows suggested:
C:\gradle-8.1.1
- Linux suggested:
/opt/gradle-8.1.1
- Windows suggested:
- Create a version-less symbolic link. This makes it easy to upgrade. Use the link in
PATH
and in IDEs.- Unix command:
ln -s /opt/gradle-8.1.1/ /opt/gradle
- Windows command:
mklink C:\gradle
C:\gradle-8.1.1
- Unix command:
- Add Gradle
bin
folder to thePATH
environment variable.- Linux: Add
export PATH=$PATH:/opt/gradle/bin
to~/.bashrc
- Linux: Add
Example commands on a Unix system:
...
MultiExcerptName | Gradle quickstart |
---|
...
MultiExcerptName | gradle verify |
---|
Verify installation:
SDKMAN! Installation
Alternatively will can use SDKMAN! which is a package manager for Gradle, Java, and many other frameworks on Ubuntu.
See the page on SDKMAN!
Now install Gradle:
sdk install gradle 8.1.1
Note, Gradle will be installed in a hidden folder located at (You may have to press Ctrl + H to view hidden folders in Ubuntu's file explorer):
...
Gradle does not have any official installers. There are many community (package manager) based installation methods, or you can install it manually.
Gradle installation helper scripts
We maintain some helper scripts to install Gradle system-wide for both Ubuntu and Windows. These live in the repository-group repository. There are instructions here.
Configuration
If you have not yet read the Gradle official documentation on the Build Environment, please do so now. This section will mostly contain the important highlights of that document. Gradle properties files are .properties files.
...