On 21/04/2011, at 12:29 PM, Benjamin Muschko wrote: > Hi, > > I was wondering what the recommended way is to get the Gradle home directory > of the current build being executed. I had a look at the JavaDoc of > Gradle.java and its method > http://www.gradle.org/latest/docs/javadoc/org/gradle/api/invocation/Gradle.html#getGradleHomeDir%28%29 > getGradleHomeDir() is deprecated but no alternative method was given. In > case I need the Gradle home directory should I use the environment variable > GRADLE_HOME instead?
I'm curious, why do you need to get at the Gradle home directory? It's usually something that we suggest you avoid doing. If you really need to get at it, Gradle.getGradleHomeDir() is no longer deprecated (as of a few releases ago, can't remember exactly which one). Those docs are quite out-of-date, because the nightly build has been broken for quite a while. We're just moving to some new CI infrastructure, and we should be able to switch this build back on again, and the 'latest' docs will point to, well, the latest again. I'd really avoid using $GRADLE_HOME. Gradle no longer uses it, so you cannot guarantee that it has been set. -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com
