On 04/03/2011 01:58, Peter Niederwieser wrote:
Gradle has a rich API and is based on a general-purpose programming
language, so there is almost always a way. Put something like this into the
root project's build script:

file("master/profiles/$profileId").withReader { reader ->
   def userProps = new Properties()
   userProps.load(reader)
   properties.putAll(userProps)
}

Interesting.
I also found (since I had the same problem some time ago) something like:

Properties props = new Properties()
props.load(new FileInputStream("$somePath/user.properties"))
project.setProperty('props', props)

I failed to find these tricks in the Gradle doc.
If they aren't in it, might I suggest to add them (or one of them)?
Don't forget that a number of Gradle users (at least, me...) just use Gradle as a tool (to compile Java, Scala, whatever) without prior knowledge of Groovy and time (or will) to learn it (I might give it a go, but it takes time, this scarce resource). And it isn't the first time I see such request in this mailing list (which I started to read recently...).

Thanks.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to