Gradle安装与配置(Linux)

1 环境

1.1 Ubuntu 16.04;
1.2 java 1.8;
1.3 Gradle插件;

2 下载gradle安装包

下载地址:https://gradle.org/releases
Gradle Distribution地址:http://services.gradle.org/distributions

3 安装gradle

3.1 解压安装包:

$ sudo mkdir /opt/gradle
$ sudo unzip -d /opt/gradle gradle-6.5-all.zip

3.2 配置gradle环境变量:

$ sudo vim /etc/profile
export GRADLE_HOME=/opt/gradle/gradle-6.5
export PATH=${GRADLE_HOME}/bin:$PATH
$ source /etc/profile

3.3 验证安装:

$ gradle -v
------------------------------------------------------------
Gradle 6.5
------------------------------------------------------------

Build time:   2020-06-02 20:46:21 UTC
Revision:     a27f41e4ae5e8a41ab9b19f8dd6d86d7b384dad4

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          1.8.0_251 (Oracle Corporation 25.251-b08)
OS:           Linux 4.15.0-106-generic amd64

你可能感兴趣的:(Gradle安装与配置(Linux))