I am trying to import a Gradle project into IntelliJ, and when I get to the Gradle Home
textbox, it is not automatically populated, nor will typing in the path of Gradle Home
result in a valid location – I have the GRADLE_USER_HOME
environment variable set (to what I think is!) the correct path, and I have been able to successfully import this same project into Eclipse. Any suggestions?
Gradle – How to define Gradle’s home in IDEA
gradleintellij-idea
Best Solution
You can write a simple gradle script to print your
GRADLE_HOME
directory.and name it
build.gradle
.Then run it with:
If you installed with homebrew, use
brew info gradle
to find the base path (i.e./usr/local/Cellar/gradle/1.10/
), and just appendlibexec
.The same task in Kotlin in case you use
build.gradle.kts
: