Thanks Adam, this explains a lot. I looked again in the docs and it is exactly as you say - sorry for not reading it well enough :)
>Things like this make me wonder whether dynamic properties for tasks (and projects) are actually a bad idea. Interesting. The mistake on my part is mostly because I'm both: gradle newbie and groovy newbie. I like the idea that gradle fails fast if I make a typo like (for example) include = 'xxx' instead includes = 'xxx'. Looking forward for 1.0 :) Thanks! Szczepan On Tue, Jun 1, 2010 at 6:43 AM, Adam Murdoch <[email protected]> wrote: > > > On 1/06/10 1:29 AM, szczepiq wrote: > >> Hey guys, >> >> I cannot get include/exclude to work with 'test' task. Here's my gradle: >> >> ant.importBuild 'build.xml' >> >> usePlugin 'java' >> >> test { >> testClassesDir = file('../automatedbuild/classes') >> scanForTestClasses = false >> include = '**/CreditLimitsTest.class' >> forkEvery = null >> exclude = '**/*.*' >> } >> >> The problem is that it always picks up all tests for execution, rather >> than the single one I expect. I played with various configuration entries >> but it always picks up all tests. >> >> > There's no 'include' or 'exclude' property on Test. The properties are > actually called 'includes' and 'excludes'. So, test { include = '...' } is > simply setting a dynamic property called 'include' on the test task. Which > doesn't do anything. > > You need to set the 'includes' property: test { includes = [ '...' ] } or > use the include() convenience method: test { include '...' } > > Things like this make me wonder whether dynamic properties for tasks (and > projects) are actually a bad idea. > > > -- > Adam Murdoch > Gradle Developer > http://www.gradle.org > CTO, Gradle Inc. - Gradle Training, Support, Consulting > http://www.gradle.biz > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >
