On 04/01/2011, at 4:25 AM, Sean Reilly wrote: > Just out of curiosity, if gradle's location is derived from the system path, > what would happen when gradle is invoked while not on the path?
The Gradle home directory is determined using the location of the script, rather than the PATH variable, so it works fine. The code for has been in the scripts for quite a while now, and is used if GRADLE_HOME is not set. All I'm planning to do is remove the check for whether GRADLE_HOME is set or not. > > I'm thinking about CI servers as a use case. Any CI server that has to > support multiple versions of gradle for different builds would probably just > invoke different gradle instances directly, wouldn't it? Probably, but this should work fine. I'd suggest people use the wrapper instead, as this nicely solves the problem of installing Gradle on CI machines (and developer machines, too), and with dealing with different builds that use different versions of Gradle. > > Sean > > On Mon, Jan 3, 2011 at 9:25 AM, Sean Reilly <[email protected]> wrote: > My team avoids the possibility of error by using the GRADLE_HOME environment > variable when setting the path: > > export PATH=$GRADLE_HOME/bin:$PATH > > Which is a fairly standard bash practice, imo. > > The change wouldn't really affect us. That being said, no reasons to keep it > come immediately to mind, either. > > Sean > > > On Mon, Jan 3, 2011 at 3:35 AM, 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 > > > -- Adam Murdoch Gradle Developer http://www.gradle.org CTO, Gradle Inc. - Gradle Training, Support, Consulting http://www.gradle.biz
