I tried that approach, but I am finding that whatever I configure does indeed 
override the default configuration. In other words, the contents of 
src/test/resources don't get copied if I configure anything here. Could this be 
a bug?

On another note, how can I work around the limitation that includes/excludes is 
not configurable on a per directory basis? Would you suggest I simply avoid 
closures and the DSL and set things up "manually"?

Thanks. 

-----Original Message-----
From: Peter Niederwieser [mailto:[email protected]] 
Sent: Monday, March 14, 2011 5:50 AM
To: [email protected]
Subject: [gradle-user] Re: Combining FileTrees Into a Single SourceSet

sourceSets.test.resources is not a SourceSet but a SourceDirectorySet
(sourceSets.test is the SourceSet). You can configure it as follows:

sourceSets {
  test {
    resources {
      srcDir "src/main/foo/lish/ness" 
      include "**/who/**" 
      exclude "**/what/**" 
      srcDir "src/main/bar/bra/gordon" 
      include "**/when/**" 
      exclude "**/where/**" 
    }
  }
}

This will add two source directories without overwriting the default one.
One limitation is that includes and excludes currently apply to the whole
source directory set rather than to individual directories.

--
Peter Niederwieser 
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradleware
http://www.gradleware.com
Creator, Spock Framework
http://spockframework.org




--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Combining-FileTrees-Into-a-Single-SourceSet-tp3441848p3556062.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


Reply via email to