On 04/01/2011, at 1:13 AM, Philip Crotwell wrote:
> At least in a bash script, you could avoid the problems with manually
> setting a GRADLE_HOME environment variable by automatically
> determining the "gradle home" in the start script. Something like:
>
> PRG=$0
> saveddir=`pwd`
> # need this for relative symlinks
> PRGDIR=`dirname "$PRG"`
> GRADLE_HOME="$PRGDIR/.."
> # make it fully qualified
> GRADLE_HOME=`cd "${GRADLE_HOME}" && pwd`
> cd "$saveddir"
>
> Not sure if you can play a similar trick in windows.
You can. The existing gradle.bat script does this if GRADLE_HOME is not set.
>
> Philip
>
> On Mon, Jan 3, 2011 at 4:37 AM, Baruch Sadogursky
> <[email protected]> wrote:
>> Idea plugin is using it, isn't it?
>>
>> On Mon, Jan 3, 2011 at 11:35, Adam Murdoch <[email protected]> wrote:
>>>
>>> Hi,
>>> I'd like to axe the $GRADLE_HOME environment variable.
>>> The reason is that you have to change both the PATH and GRADLE_HOME
>>> variables when you switch Gradle versions. This is prone to error, so that
>>> you end up using a version which you don't expect.
>>> You can achieve the same effect that GRADLE_HOME provides by messing with
>>> your PATH variable, so I think that GRADLE_HOME is just pointless
>>> complexity.
>>> Does anyone have a good reason to keep it?
>>>
>>>
>>> --
>>> Adam Murdoch
>>> Gradle Developer
>>> http://www.gradle.org
>>> CTO, Gradle Inc. - Gradle Training, Support, Consulting
>>> http://www.gradle.biz
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Baruch
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz