Java Programming Tutorials

Java programming tutorials with many code examples!

Gradle install and setup


How to install and setup Gradle?


  1. Download Gradle
  2. Unpack it to a directory
    $> unzip -d ~/programs
  3. Create environment variable GRADLE_HOME that points to the Gradle install directory.
    # In Linux it's best to add the following line to ~/.bashrc:
    export GRADLE_HOME=~/programs/gradle-2.4
  4. Add GRADLE_HOME/bin to the PATH variable
    export PATH="${PATH}":"${GRADLE_HOME}/bin"
  5. Reload system variables.


Running “gradle –version” in command line should give similar result:

$> gradle --version

Gradle 2.4

Build time:   2015-05-05 08:09:24 UTC
Build number: none
Revision:     5c9c3bc20ca1c281ac7972643f1e2d190f2c943c

Groovy:       2.3.10
Ant:          Apache Ant(TM) version 1.9.4 compiled on April 29 2014
JVM:          1.8.0_45 (Oracle Corporation 25.45-b02)
OS:           Linux 3.16.0-37-generic amd64
Was it helpful? Share!