赞
踩
这里以mac为例安装gradle,其实windows同理。
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install gradle
- 编辑 .bash_profile:
- export GRADLE_HOME=/usr/local/gradle/gradle-6.0.1
- 更新 PATH环境变量(这里不要照抄):
- export PATH=$GRADLE_HOME/bin:$PATH
- 应用配置:
- source ~/.bash_profile
- > gradle -v
-
- Welcome to Gradle 5.4.1!
-
- Here are the highlights of this release:
- - Run builds with JDK12
- - New API for Incremental Tasks
- - Updates to native projects, including Swift 5 support
-
- For more details see https://docs.gradle.org/5.4.1/release-notes.html
-
-
- ------------------------------------------------------------
- Gradle 5.4.1
- ------------------------------------------------------------
-
- Build time: 2019-04-26 08:14:42 UTC
- Revision: 261d171646b36a6a28d5a19a69676cd098a4c19d
-
- Kotlin: 1.3.21
- Groovy: 2.5.4
- Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
- JVM: 1.8.0_91 (Oracle Corporation 25.91-b14)
- OS: Mac OS X 10.14.6 x86_64
- vi ~/.bash_profile
- GRADLE_USER_HOME=/Users/caowg/.m2/repository
- export GRADLE_USER_HOME
source ~/.bash_profile
- 先vi ~/.zshrc
- 添加:source ~/.bash_profile
- 然后 source ~/.zshrc
-
如对您有帮助欢迎点赞,留言讨论,谢谢。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。