首页 > 代码库 > Mac下安装配置gradle

Mac下安装配置gradle

1.下载gradle
2.解压
3.获得gradle解压后的路径
4.修改.bash_profile文件,配置环境变量
  vi ~./bash_profile

export GRADLE_HOME=/Users/FengZhen/Desktop/java/gradle/gradle-3.4.1/bin
export PATH=$PATH:$GRADLE_HOME

5. source ~/.bash_profile
  source命令通常用于重新执行刚修改的初始化文件,使之立即生效,而不必注销并重新登录
6.gradle –version 出现以下内容说明成功

EFdeMacBook-Pro:gradle-3.4.1 FengZhen$ gradle -version

------------------------------------------------------------
Gradle 3.4.1
------------------------------------------------------------

Build time: 2017-03-03 19:45:41 UTC
Revision: 9eb76efdd3d034dc506c719dac2955efb5ff9a93

Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.7.0_79 (Oracle Corporation 24.79-b02)
OS: Mac OS X 10.11.3 x86_64

 

Mac下安装配置gradle