Hans,
On Sat, 2009-01-10 at 17:16 +0100, Hans Dockter wrote:
> Hi Russel,
>
> On Jan 10, 2009, at 1:54 PM, Russel Winder wrote:
>
> > From the manual I see things like:
> >
> > repository(url: "ssh://localhost/tmp/myRepo/") {
> > authentication(userName: "me", password: "myPassword")
> >
> >
> > which implies having a username and password in the Gradle file. This
> > has to be "bad news". Maven stores information in ~/.m2/settings.xml,
> > shouldn't Gradle do something analogous?
>
> Of course we don't expect our users to store passwords in the build
> script. What you would do, is to use a gradle.properties placed in
> USER_HOME/.gradle.
> You would write for example:
>
> repoUser=me
> repoPassword=pw
>
> In your build script you can access this properties like normal script
> variables.
>
> authentication(userName: repoUser, password: repoPassword)On the one hand, I should say "Doh!" -- the solution is blindingly obvious and quite right. Sorry I didn't think of it before emailing. On the other hand I think this idiom needs writing about in the user document -- I don't think the document should show any use of password literals in Gradle files that are part of projects. -- Russel. ==================================================== Dr Russel Winder Partner Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203 41 Buckmaster Road, f: +44 8700 516 084 London SW11 1EN, UK. m: +44 7770 465 077
signature.asc
Description: This is a digitally signed message part
