How to pass objects from one Gradle task to another?

Hi,

Basically, inside of the @TaskAction-marked method on the ReadEnvironmentInfoTask I compute some result value that I then want to be available to the caller of this task/method. Thus, I was wondering if there is a way to pass this result from within ReadEnvironmentInfoTask into the config.name variable, which is defined within the scope of the gradle script above, so I can then reference config.name from within other tasks that I would define in the same script.

Hope that clarifies it a little better.

Thanks, Dmitriy.