AdSense

網頁

2019/10/28

Mac 更新Gradle版本

Mac更新gradle版本的方法如下。

環境如下:

  • macOS High Sierra (Version 10.13.4)

以管理者權限在Terminal執行brew upgrade gradle即可。

例如原本我的Mac的Gradle版本為3.2.1如下。

~$ gradle -v

------------------------------------------------------------
Gradle 3.2.1
------------------------------------------------------------

Build time:   2016-11-22 15:19:54 UTC
Revision:     83b485b914fd4f335ad0e66af9d14aad458d2cc5

Groovy:       2.4.7
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_111 (Oracle Corporation 25.111-b14)
OS:           Mac OS X 10.13.4 x86_64

~$ which brew
/usr/local/bin/brew
~$ which gradle
/usr/local/bin/gradle

使用brew upgrade gradle指令更新Gradle版本。

~$ brew upgrade gradle
==> Upgrading 1 outdated package:
gradle 3.2.1 -> 5.6.3
==> Upgrading gradle
==> Downloading https://services.gradle.org/distributions/gradle-5.6.3-all.zip
==> Downloading from https://downloads.gradle-dn.com/distributions/gradle-5.6.3-all.zip
######################################################################## 100.0%
🍺  /usr/local/Cellar/gradle/5.6.3: 14,317 files, 245.3MB, built in 1 minute 17 seconds
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /usr/local/Cellar/gradle/3.2.1... (174 files, 73.2MB)
Pruned 2 symbolic links from /usr/local

參考:

沒有留言:

AdSense