Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
borderStylesolid
titleContents

Table of Contents

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 and src 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 your PATH or placing a symbolic link somewhere in the system path.

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:

  1. Download an *-all or "complete" distribution zip from https://services.gradle.org/distributions/ or https://gradle.org/releases/
    1. Make sure the zip file contains bin and src
  2. Unzip the distribution
    1. Linux command: unzip gradle.zip -d gradle
  3. Copy the distribution to a suitable system directory.
    1. Windows suggested: C:\gradle-8.1.1
    2. Linux suggested: /opt/gradle-8.1.1
  4. Create a version-less symbolic link. This makes it easy to upgrade. Use the link in PATH and in IDEs.
    1. Unix command: ln -s /opt/gradle-8.1.1/ /opt/gradle
    2. Windows command: mklink C:\gradle C:\gradle-8.1.1
  5. Add Gradle bin folder to the PATH environment variable.
    1. Linux: Add export PATH=$PATH:/opt/gradle/bin to ~/.bashrc

Example commands on a Unix system:

...

MultiExcerptNameGradle quickstart

...

MultiExcerptNamegradle 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.

...