Linux安装Gradle

博客介绍了Gradle在Linux系统上的安装方法。首先可在官网https://gradle.org/releases/查看各版本下载地址,然后在/etc/profile文件中添加export PATH=$PATH:/usr/local/gradle/bin,最后显示安装成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在官网查看各版本下载地址
https://gradle.org/releases/

cd /usr/local #进入安装目录
wget https://services.gradle.org/distributions/gradle-6.8.3-bin.zip #下载Gradle
unzip gradle-6.8.3-bin.zip #解压
mv gradle-6.8.3 gradle #重命名
rm -rf gradle-6.8.3-bin.zip #删除压缩包
vim /etc/profile #编辑/etc/profile

/etc/profile添加
export PATH=$PATH:/usr/local/gradle/bin

source /etc/profile #使其生效
gradle --version #查看Gradle版本,验证是否安装成功

输出

Welcome to Gradle 6.8.3!

Here are the highlights of this release:
 - Faster Kotlin DSL script compilation
 - Vendor selection for Java toolchains
 - Convenient execution of tasks in composite builds
 - Consistent dependency resolution

For more details see https://docs.gradle.org/6.8.3/release-notes.html


------------------------------------------------------------
Gradle 6.8.3
------------------------------------------------------------

Build time:   2021-02-22 16:13:28 UTC
Revision:     9e26b4a9ebb910eaa1b8da8ff8575e514bc61c78

Kotlin:       1.4.20
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          1.8.0_211 (Oracle Corporation 25.211-b12)
OS:           Linux 3.10.0-1127.13.1.el7.x86_64 amd64

安装成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值