如何在IDEA中定义Gradle的家? [英] How to define Gradle's home in IDEA?
问题描述
我试图将一个Gradle项目导入IntelliJ,当我到达 Gradle Home
文本框时,它不会自动填充,也不会输入 Gradle Home
会产生一个有效的位置 - 我有 GRADLE_USER_HOME
环境变量集(根据我的想法!)正确的路径,并且我已经能够成功将相同的项目导入到Eclipse中。任何建议?
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脚本来打印你的 GRADLE_HOME
目录。
You can write a simple gradle script to print your GRADLE_HOME
directory.
task getHomeDir << {
println gradle.gradleHomeDir
}
并将其命名为 build.gradle
。
然后运行它:
Then run it with:
gradle getHomeDir
如果您安装了自制软件,请使用 brew info gradle
来查找基本路径(即 /usr/local/Cellar/gradle/1.10/
),然后附加 libexec
。
If you installed with homebrew, use brew info gradle
to find the base path (i.e. /usr/local/Cellar/gradle/1.10/
), and just append libexec
.
这篇关于如何在IDEA中定义Gradle的家?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!