question about example in the documentation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

question about example in the documentation

Ittay Dror
In 9.7.3 in the documentation, this example is given:
dists {
    dists {
       tasksBaseName = 'gradle'
       dependsOn 'explodedDist'
       childrenDependOn << 'explodedDist'
       zip() {
          zipFileSet(dir: explodedDistDir, prefix: "gradle-$version") {
              exclude '**/*.tmp'
          }
       }
       zip("gradle-src") {
         String prefix = "$gradle-src-$version"
         zipFileSet(dir: projectDir, prefix: prefix) {
            include 'src/', 'gradle.groovy'
         }
      }
   }
}

I'm having a hard time understanding it.

Does the first 'dists' refer to the 'dists' task? if so, shouldn't it be 'dists.configure...'? What is the second 'dists'?

Can I do the same for 'libs'?

Thank you,
Ittay
Reply | Threaded
Open this post in threaded view
|

Re: question about example in the documentation

hans_d
Administrator
Hi Ittay,

On May 27, 2008, at 5:22 PM, Ittay Dror wrote:

>
> In 9.7.3 in the documentation, this example is given:
> dists {
>     dists {
>        tasksBaseName = 'gradle'
>        dependsOn 'explodedDist'
>        childrenDependOn << 'explodedDist'
>        zip() {
>           zipFileSet(dir: explodedDistDir, prefix: "gradle-
> $version") {
>               exclude '**/*.tmp'
>           }
>        }
>        zip("gradle-src") {
>          String prefix = "$gradle-src-$version"
>          zipFileSet(dir: projectDir, prefix: prefix) {
>             include 'src/', 'gradle.groovy'
>          }
>       }
>    }
> }
>
> I'm having a hard time understanding it.
>
> Does the first 'dists' refer to the 'dists' task? if so, shouldn't  
> it be
> 'dists.configure...'? What is the second 'dists'?

This is a bug in the documentation. One dists too many.

dists { } is equivalent to dists.configure { }. Have a look at the  
end of chapter 7.1.

Anyway, the whole archive handling needs better documentation. This  
will be improved with 0.2-M1 together with some changes and  
improvements to archive handling.

>
> Can I do the same for 'libs'?

Yes

- Hans

>
> Thank you,
> Ittay
> --
> View this message in context: http://www.nabble.com/question-about- 
> example-in-the-documentation-tp17492911p17492911.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
>
>

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: question about example in the documentation

Ittay Dror

hdockter wrote
This is a bug in the documentation. One dists too many.

dists { } is equivalent to dists.configure { }. Have a look at the  
end of chapter 7.1.
Thanks, I already figured it out myself. Just wanted to say that Gradle looks like a great tool. I managed to take an existing project, one that generated Java files and produced several jars and make gradle build it in a matter of hours, without knowing groovy before. Great job!

Ittay