Hello,

on experimenting with archive tasks, I got surprised by the way, things work.
An excerpt from my build-file is this:

task tellSources << {
   def sources = files(subprojects.collect { project->
   [ project.sourceSets.main.allJava ] })

//   sources.each { println it }
   copy {
      from sources
      into file(rootProject.buildDir).absolutePath + '/src'
   }
}

task myArchive(type: Tar) << {
   baseName = 'rednose'
   destinationDir = rootProject.buildDir
   from(file(rootProject.buildDir).absolutePath + '/src') {
      include '**/*.java'
   }
}
myArchive.dependsOn tellSources

My defaultTasks are 'clean' and 'build' - so when I run gradle without any 
argument, I was very surprised, that the build-dir contained a src-directory 
which all sources in.
From my point of view, none of my bizarre task-definition is part of the 
standard task-graph (or at least should not be).

When I look at the executed tasks, I'll find this:

...$ fgradle
:clean UP-TO-DATE
:SRLibAppBase:clean
:SRLibDA:clean
:SRLibGui:clean
:SRServiceManager:clean
:SRSrvSample:clean
:SRStarter:clean
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar
:tellSources
:myArchive UP-TO-DATE
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:uploadArchives
:test UP-TO-DATE
:check UP-TO-DATE
:build
...

So how did my creepy task definitions find their way into 
the 'build'-task-graph?

And even more strange:
when I execute "gradle myArchive", I get the message, that "myArchive is 
UP-TO-DATE, but no archive has been created.

Can anybody shine me a light on what's happening?

kind regards

Geronimo

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

    http://xircles.codehaus.org/manage_email


Reply via email to