phil swenson wrote: > > Not sure why you put the -> in "def setupClosure = { ->" > > works fine without it. what does that do? >
As René already said, it won't make a difference in this case. In general, "{ ->" is sometimes needed to distinguish a closure from a code block. It also makes the closure zero-arg, as opposed to one-arg ("it") if the arrow is omitted. -- 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/better-way-to-write-this-tp4877797p4878203.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