Ubuntu 12.04.3 has an old version of Gradle (1.0-milestone-3
from September 2011) installed by default. To upgrade to a later version of Gradle, you can use Cheng-Wei Chien's PPA for Gradle athttps://launchpad.net/~cwchien/+archive/gradle by issuing the following commands:
sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update
Then, to install Gradle 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, or 2.2, you would run a command like:
sudo apt-get install gradle-2.14.1
Or, to install the latest version
sudo apt-get install gradle-ppa