Configuring GRADLE_HOME in Jenkins
Jenkins is an open source server that can be using to configure Continuous Integration for projects written in many programming languages. Let's consider the case of an that is Android-based, and which has Gradle as a build tool.
We need to tell Jenkins where the Gradle installable directory is available.
Getting ready
Download the required Gradle version or install automatically.
How to do it...
- Open the Jenkins dashboard.
- Go to
Manage Jenkins
. - Go to
Global Tool Configuration
to configure the tools, their locations, and automatic installers. - Go to the
Gradle
section. - Give the
Name
and click onInstall Automatically
,or give the path to the existing location where the Gradle installation is available.
- You can give a logical name such as
Gradle 4.0.1
orGradle 4.0.0
to identify the correct version while configuring a build job:

- You can add multiple Gradles based on the version in Jenkins.
How it works...
When you create a build job in Jenkins and configure it, you need to specify the Gradle version that will be used by the build execution. You can use existing Gradle installation available on the system as well if you don't want to install automatically.