Hi Hans, Am 12.02.11 14:42, schrieb Hans Dockter: > Hi Rene, > > On Fri, Feb 11, 2011 at 8:45 PM, Rene Groeschke <[email protected]> wrote: > >> Hi there, >> >> I want to use a set of jars in a copyspec. To group the jars we have the >> following line of code: >> >> -------- >> distJars = tasks.withType(Jar).matching({ jar -> !jar.appFileJar } >> -------- >> >> For a single jar I know I can write something like this in my copyspec: >> -------- >> "from jar.output.files" >> -------- >> > cool. I haven't thought about that approach yet. > > We always wanted to make an archive task natively understood by a copy spec. > But looking at that we should apply this pattern for any task: > > from [taskName] (which copies the output files) > from [taskContainer] (which copies all the output files of all the tasks) > > But the latter should be done lazily. > > In your case: from distJars*.outputs.files does not copy jars which are > added later then this statement is evaluated. So you can't use it in a > plugin which wants to add a copyAllJar task for example. > > There is an easy solution for that right now. Just use a closure: > > from { distJars*.outputs.files } Thanks for that hint. > But 'from distJars' would read much nicer :) > > Could you file a Jira? done. see http://jira.codehaus.org/browse/GRADLE-1386
regards, René -- ------------------------------------ Rene Groeschke [email protected] http://www.breskeby.com http://twitter.com/breskeby ------------------------------------ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
