问题描述
您可以使用命令:
brew info gradle
结果,您将获得以下内容:
gradle: stable 4.0.1
Build system based on the Groovy language
https://www.gradle.org/
/usr/local/Cellar/gradle/3.4 (181 files, 74.5MB) *
Built from source on 2017-02-24 at 15:01:34
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gradle.rb
==> Requirements
required: java >= 1.7 ✔
==> Options
--with-all
Installs Javadoc, examples, and source in addition to the binaries
在第4行上,您可以看到起始路径: /usr/local/Cellar/gradle/3.4
解决方法
我已经gradle
使用终端在MAC 上安装了。
brew install gradle
Gradle已成功安装。
gradle -v
------------------------------------------------------------
Gradle 3.3
------------------------------------------------------------
Build time: 2017-01-03 15:31:04 UTC
Revision: 075893a3d0798c0c1f322899b41ceca82e4e134b
Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_112 (Oracle Corporation 25.112-b16)
OS: Mac OS X 10.12.3 x86_64
但是我找不到gradle家。
echo $GRADLE_HOME
[empty result]
确定主目录的第一步是检测gradle
指令的位置:
which gradle
/usr/local/bin/gradle
有无法理解的bash文件。
任何想法如何通过终端检测gradle主目录?