1. 通过apt方式安装
通过apt方式安装 Gradle 非常简单,直接安装就可以,但是通常 Gradle 版本会比较旧
- 安装
sudo apt-get install gradle
2. 下载安装
mkdir /opt/gradle
unzip -d /opt/gradle gradle-4.2.1-bin.zip
export PATH=$PATH:/opt/gradle/gradle-4.2.1/bin
3. 检查安装结果
gradle -v
------------------------------------------------------------ Gradle 4.2.1 ------------------------------------------------------------
Build time: 2017-10-02 15:36:21 UTC
Revision: a88ebd6be7840c2e59ae4782eb0f27fbe3405ddf
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_144 (Oracle Corporation 25.144-b01) OS: Linux 4.4.0-62-generic amd64
原文链接:https://www.f2er.com/ubuntu/350798.html