On 29/06/2011, at 7:00 AM, Ric Klaren wrote:

> Hi,
> 
> I ran into trouble that the scanForTestClasses functionality skipped
> testng @Factory testcases (logged as
> http://issues.gradle.org/browse/GRADLE-1620). To work around that I
> switched to not scanning. But here I run into the problem that we have
> a number of test classes that have names like Abstract*Test.java.
> 
> After messing around a bit I wonder is it possible to get rid of the
> default include/exclude pattern? (Especially the exclude pattern)
> 
> I've tried things like:
> 
> test {
>   exclude = []
>   include '**/*.class'
> }
> 
> Ok.. to answer my own question after reading some code I have to do
> the following to disable the exclude pattern:
> 
> test {
>   exclude 'OhWhatASillyClassYouShallNeverFind'
>   include '**/*.class'
> }
> 
> Or am I missing something (very probable ;) )?

I don't think so. The Test task will add the default excludes if none are 
specified, so you have to add a dummy exclude if you don't want the defaults.

I think we should get rid of those default patterns, they're not particularly 
useful.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to