Depending on what you need to achieve you might get avay with just using sourcesets directly (without the need to copy). Sourcesets already has support for include/exclude patterns.
You could override the default one for java or define our own. Api http://gradle.org/current/docs/javadoc/org/gradle/api/tasks/SourceSet.html Cheers Magnus > Date: Thu, 4 Aug 2011 13:03:01 -0600 > From: [email protected] > To: [email protected] > Subject: [gradle-user] Re: handling messy source sets > > this works for copy. guess I was going off an old example or something..... > > includesList = > ["com/myco/optimize/management/**", > "com/myco/optimize/core/AbstractJmsPublisher**"] > > excludesList = [ > "com/myco/optimize/logging/LoggerInitializer*" > ] > > task copy(type: Copy) { > from(srcDir) > into 'build/target' > include includesList > exclude excludesList > } > > On Thu, Aug 4, 2011 at 12:06 PM, phil swenson <[email protected]> wrote: > > I tried doing a copy and did this(below), unfortunately it's copying > > EVERYTHING, not just my patterns. Looks correct to me... ideas? > > > > task copy(type:Copy) { > > from(srcDir) { > > includes.each{ > > include it > > } > > excludes.each{ > > exclude it > > } > > } > > into 'build/target' > > } > > > > > > > > includes = [ > > "com/myco/management/**", > > "com/myco/core/AbstractJmsPublisher**"] > > > > excludes = [ > > "com/myco/logging/LoggerInitializer*" > > ] > > > > On Thu, Aug 4, 2011 at 11:16 AM, phil swenson <[email protected]> > > wrote: > >> I have a legacy project that I'm trying to use gradle against. > >> > >> The includes are patterns like: > >> > >> com/myco/service/external/router/MapiMetadataRequestJms** > >> com/myco/event/common/DCADimension** > >> > >> and exclude patterns like: > >> com/myco/logging/LoggerInitializer* > >> > >> Does gradle support this? Or will I need to to a copy task to move to > >> another directory? > >> > >> thanks > >> phil > >> > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > >
