project.uniqueVersion doesn't get set until AFTER uploadLocalizations is called. I need the setting to happen BEFORE.
On Fri, Oct 7, 2011 at 10:04 PM, Merlyn Albery-Speyer < [email protected]> wrote: > @phil What's missing if you do this? > > task releaseLocalizations(dependsOn: uploadLocalizations) << { > project.uniqueVersion = true > } > > On Fri, Oct 7, 2011 at 8:38 AM, phil swenson <[email protected]> > wrote: > > Right, I figured doFirst() wouldn't work, just tried it real quick. > > answer 1: > > I don't know what you mean by "why not set it right away?" > > What I have is a task that normally operates a particular way. > Currently, > > we can change its behavior with a -Pproject.uniqueVersion = true. > However, > > people find this unintuitive, so I offered an option of having a separate > > task that hides setting the property. Users liked this idea. > > answer 2: no reason, that's just how I wrote it at that moment in time. > > I'll change it :) > > so what I gather is: gradle doesn't really support this sort of thing. I > > can search the task graph and find the task and call execute() I guess. > > > > On Thu, Oct 6, 2011 at 5:23 PM, Peter Niederwieser <[email protected]> > > wrote: > >> > >> An action is always executed as part of the task that it has been added > >> to. > >> Hence you'll have to call "doFirst {}" on task "uploadLocalizations". > >> > >> Two things that strike me: > >> > >> 1. Why do you set a project property to a constant value before some > task > >> gets executed? Why not set it right away? > >> 2. Why do you use "setProperty" rather than setting the property > directly > >> ("project.uniqueVersion = true")? > >> > >> -- > >> Peter Niederwieser > >> Principal Engineer, Gradleware > >> http://gradleware.com > >> Creator, Spock Framework > >> http://spockframework.org > >> Twitter: @pniederw > >> > >> -- > >> View this message in context: > >> > http://gradle.1045684.n5.nabble.com/dependency-task-issue-tp4878218p4878271.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 > > >
