Gradle home cannot be found on Mac

We Are Going To Discuss About Gradle home cannot be found on Mac. So lets Start this Java Article.

Gradle home cannot be found on Mac

  1. Gradle home cannot be found on Mac

    On Mojave (v10.14), Gradle v5.4, I had to append libexec after Gradle version for IntelliJ to work.
    /usr/local/Cellar/gradle/5.4/libexec

  2. Gradle home cannot be found on Mac

    On Mojave (v10.14), Gradle v5.4, I had to append libexec after Gradle version for IntelliJ to work.
    /usr/local/Cellar/gradle/5.4/libexec

Solution 1

You can use command:

brew info gradle

As the result you will have something like this:

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

Here, on the line 4 you can see the home path : /usr/local/Cellar/gradle/3.4

Original Author dvelopp Of This Content

Solution 2

On Mojave (v10.14), Gradle v5.4, I had to append libexec after Gradle version for IntelliJ to work.

/usr/local/Cellar/gradle/5.4/libexec

Original Author Moazzem Hossen Of This Content

Solution 3

You can retrieve the path for GRADLE_HOME automatically using the following snippet in your .bashrc or .zshrc:

export GRADLE_HOME=$(brew info gradle | grep /usr/local/Cellar/gradle | awk '{print $1}')

This is handy when the path to Gradle’s home changes, when Gradle is updated.

Original Author jokoso Of This Content

Solution 4

“brew info gradle” command not always give the installed path

br*ew info gradle
gradle: stable 5.6.3
Open-source build automation tool based on the Groovy and Kotlin DSL
https://www.gradle.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gradle.rb
==> Requirements
Required: java >= 1.8 ✔
==> Analytics
install: 29,106 (30 days), 144,607 (90 days), 611,211 (365 days)
install_on_request: 28,237 (30 days), 137,584 (90 days), 577,691 (365 days)
build_error: 0 (30 days)*

Original Author SNL Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment