Ubuntu 安装 gradle

  1. 在官网https://gradle.org/install/ 下载安装包 gradle-5.0-rc-3-all.zip
  2. 将安装包解压在任意目录下
  3. 设置运行环境
vi  /etc/profile
## 添加两行
export GRADLE_HOME=/home/linyk3/gradle-5.0-rc-3
export PATH=$GRADLE_HOME/bin:$PATH

## 使配置文件即时生效
linyk3@ThinkPad-S5:~$ source /etc/profile
  1. 查看gradle 版本 gradle -version
linyk3@ThinkPad-S5:~$ gradle -version

Welcome to Gradle 5.0-rc-3!

Here are the highlights of this release:
 - Kotlin DSL 1.0
 - Task timeouts
 - Dependency alignment aka BOM support
 - Interactive `gradle init`

For more details see https://docs.gradle.org/5.0-rc-3/release-notes.html


------------------------------------------------------------
Gradle 5.0-rc-3
------------------------------------------------------------

Build time:   2018-11-14 16:01:47 UTC
Revision:     63f11c722124617f7cbe2f95ad5a5e045b8b42f6

Kotlin DSL:   1.0.3
Kotlin:       1.3.0
Groovy:       2.5.3
Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM:          1.8.0_161 (Oracle Corporation 25.161-b12)
OS:           Linux 4.13.0-36-generic amd64

linyk3@ThinkPad-S5:~$

你可能感兴趣的:(Ubuntu 安装 gradle)