PROJECT_HOME is actually a placeholder for several variables needed for the runtime execution of the compiled software. Unfortunately, some do have to be environment variables if for no better reason than that we don't have a lot of control over some of the code expecting to find them. Even if we put them in a .properties file they would still need to be environment variables as well. Since the values can change pretty frequently (sometimes developers will have multiple windows open with different bindings in each) I'd strongly prefer to keep everything in environment variables for consistency and ease of use.
I was thinking that the daemon might make the case for having a Gradle-specific way of accessing environment variables. If say "env" was a special variable initialized for you by Gradle, then when we were using the daemon we could somehow pass off the environment variables from the calling script. Is there a way, perhaps, that I can get a hold of the calling script's environment? On Tue, Aug 2, 2011 at 6:51 AM, Peter Niederwieser <[email protected]> wrote: > What is PROJECT_HOME used for? Does it have to be an environment variable? > > -- > Peter Niederwieser > Principal Engineer, Gradleware > http://gradleware.com > Creator, Spock Framework > http://spockframework.org > Twitter: @pniederw > > > Jared D. Cottrell wrote: >> >> Our build script is doing something like this to get the user's chosen >> project home directory from an environment variable: >> >> def projectHome = System.getenv()['PROJECT_HOME'] >> >> However, when we use the gradle daemon it looks like the value is not >> taken from the environment that starts the individual gradle build but >> from the environment that started the daemon. I know the daemon is >> experimental, but anyone have any pointers to help us out? >> > > > -- > View this message in context: > http://gradle.1045684.n5.nabble.com/Environment-Variables-with-Gradle-Daemon-tp4651260p4658784.html > Sent from the gradle-user mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
