Gradle installation in Ubuntu

28 / Jan / 2015 by Navkrishna 3 comments

In this post we are going to learn about Gradle installation in Ubuntu 14.04.

1. Open terminal and execute this command to install Gradle
$ sudo apt-get install gradle

This command will set the path variables automatically. And, you are ready to work with Gradle.

code

2. Download Gradle from the official website and extract it in a directory. In my case it is
/home/krishna/Documents/gradle_dev/gradle-2.2.1

Set environment path variable GRADLE_HOME. To set this path open terminal and open /etc/profile
$ sudo gedit /etc/profile

This will open profile file in gedit. Add following lines after the last line

GRADLE_HOME=/home/krishna/Documents/gradle_dev/gradle-2.2.1/
PATH=$PATH:$GRADLE_HOME/bin
export GRADLE_HOME
export PATH

Replace GRADLE_HOME path with your Gradle installation path.

Save file and close gedit. Restart the system. Open terminal and type
$ gradle -v

the output would be similar to this

------------------------------------------------------------
Gradle 2.2.1
------------------------------------------------------------

Build time:   2014-11-24 09:45:35 UTC
Build number: none
Revision:     6fcb59c06f43a4e6b1bcb401f7686a8601a1fb4a

Groovy:       2.3.6
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.8.0_31 (Oracle Corporation 25.31-b07)
OS:           Linux 3.13.0-44-generic amd64

Go through our innovative product engineering solutions and services.

FOUND THIS USEFUL? SHARE IT

comments (3)

  1. Alex

    I found I had to put the GRADLE_HOME before $PATH, otherwise the old 1.4 version of gradle gets picked 1st.

    Also, using Windows Bash Shell, I had to edit the .bashrc instead of /etc/profile.

    But otherwise, very helpful, thankyou.

    Reply
  2. Pingback: Integrating SpringBoot with Gradle | TO THE NEW Blog

Leave a Reply to sarfaraz Cancel reply

Your email address will not be published. Required fields are marked *