Mac用homebrew brew来安装gradle,gradle路径在哪里? 如何配置idea gradle?

用bew info来查看路径:brew info gradle

mac@Mac-Zhang gradle % brew info gradle
...
...
/usr/local/Cellar/gradle/4.10.2 (209 files, 83.7MB) *
...
...
...

bew默认安装路径:(下面两个是一样的)

/usr/local/Cellar/gradle

/usr/local/opt/gradle

mac@adsl-99-11-45-112 4.10.2 % cd /usr/local/Cellar/gradle/4.10.2
mac@adsl-99-11-45-112 4.10.2 % ls -lt
total 128
-rw-r--r--  1 mac  admin    597  5  8  2019 INSTALL_RECEIPT.json
drwxr-xr-x  3 mac  admin     96  5  8  2019 bin
drwxr-xr-x  4 mac  admin    128  5  8  2019 libexec
-rw-r--r--  1 mac  admin  55261  9 19  2018 LICENSE
-rw-r--r--  1 mac  admin    802  9 19  2018 NOTICE
mac@adsl-99-11-45-112 4.10.2 % 
mac@adsl-99-11-45-112 gradle % cd /usr/local/opt/gradle
mac@adsl-99-11-45-112 gradle % 
mac@adsl-99-11-45-112 gradle % ls
INSTALL_RECEIPT.json	NOTICE			libexec
LICENSE			bin
mac@adsl-99-11-45-112 gradle % 

依赖包存放路径:/Users/mac/.gradle/  下:/Users/mac/.gradle/caches/modules-2/files-2.1

mac@adsl-99-11-45-112 .gradle % cd /Users/mac/.gradle
mac@adsl-99-11-45-112 .gradle % ls -lt
total 0
drwxr-xr-x  10 mac  staff  320  6 16 21:26 caches
drwxr-xr-x   5 mac  staff  160  6 16 21:26 daemon
drwxr-xr-x   5 mac  staff  160  6 16 21:26 native
drwxr-xr-x   3 mac  staff   96  5  8  2019 notifications
drwxr-xr-x   3 mac  staff   96  5  8  2019 wrapper
mac@adsl-99-11-45-112 .gradle % 

gradle的warpper路径:/Users/mac/.gradle/wrapper/dists

idea配置gradle的路径, 注意不能直接用/usr/local/Cellar/gradle,要使用 libexec的路径:/usr/local/Cellar/gradle/4.10.2/libexec

 

 

你可能感兴趣的:(gradle)