Table of Contents
Here’s the way I installed the latest gradle into Ubuntu.
Story
The gradle version in Ubuntu repository is 1.4. The command of gradle version 1.4 is different from gradle version 2. For example, gradle init
raise error in version 1.4, but not in version 2. Prevailed documents are on the bases of gradle version 2, so I had to install gradle 2 into my computer, ubuntu.
Environment
- Ubuntu 14.04.3 LTS
Installation
Uninstall Existing gradle
Uninstall existing gradle to prevent confusing.
1 |
sudo apt-get purge gradle |
Add Repository
Add gradle repository I use with apt command.
1 |
sudo add-apt-repository ppa:cwchien/gradle |
Then, the following output are shown and you will be asked to continue or not, press Enter end proceed.
1 2 3 4 5 6 7 8 9 |
Gradle is a Groovy based build system. Gradle is build automation evolved. Gradle can automate the building, testing, publishing, deployment and more of software packages or other types of projects such as generated static websites, generated documentation or indeed anything else. Gradle combines the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build. Powered by a Groovy DSL and packed with innovation, Gradle provides a declarative way to describe all kinds of builds through sensible defaults. Gradle is quickly becoming the build system of choice for many open source projects, leading edge enterprises and legacy automation challenges. More info: <http://gradle.org/> More info: https://launchpad.net/~cwchien/+archive/ubuntu/gradle Press [ENTER] to continue or ctrl-c to cancel adding it |
gpg
でキーが作成されます。
1 2 3 4 5 6 7 8 |
gpg: keyring `/tmp/xxxxxxxxxxx/secring.gpg' created gpg: keyring `/tmp/xxxxxxxxxxx/pubring.gpg' created gpg: requesting key XXXXXXXX from hkp server keyserver.ubuntu.com gpg: /tmp/xxxxxxxxxxx/trustdb.gpg: trustdb created gpg: key XXXXXXXX: public key "Launchpad PPA for Cheng-Wei Chien" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK |
After adding the repository, update cache of repositories.
1 |
sudo apt-get update |
Install gradle
First, check packages of gradle.
1 |
apt-cache search gradle |
In my environment, package list were like the following.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
gradle-doc - Documentation for gradle libgradle-core-java - Groovy based build system - Core library libgradle-plugins-java - Groovy based build system - All plugins missidentify - a program to find win32 applications gradle - Gradle is a Groovy based build system gradle-ppa - Gradle is a Groovy based build system gradle-1.10 - Gradle is a Groovy based build system gradle-1.11 - Gradle is a Groovy based build system gradle-1.12 - Gradle is a Groovy based build system gradle-2.0 - Gradle is a Groovy based build system gradle-2.1 - Gradle is a Groovy based build system gradle-2.2 - Gradle is a Groovy based build system gradle-2.2.1 - Gradle is a Groovy based build system gradle-2.3 - Gradle is a Groovy based build system gradle-2.4 - Gradle is a Groovy based build system gradle-2.5 - Gradle is a Groovy based build system gradle-2.6 - Gradle is a Groovy based build system gradle-2.7 - Gradle is a Groovy based build system gradle-2.8 - Gradle is a Groovy based build system gradle-2.9 - Gradle is a Groovy based build system gradle-2.10 - Gradle is a Groovy based build system |
Then I installed gradle-2.10.
1 |
sudo apt-get install gradle-2.10 |