用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

 

 

GitHub 加速计划 / br / brew
40.4 K
9.47 K
下载
🍺 The missing package manager for macOS (or Linux)
最近提交(Master分支:30 天前 )
90a90b30 2 个月前
47b1cab7 2 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐