[GRADLE-1649] Remove default exclude patterns for test tasks Created: 28/Jun/11  Updated: 04/Jan/13  Resolved: 07/Sep/11

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 1.0-milestone-5

Type: Improvement
Reporter: Luke Daley Assignee: Adam Murdoch
Resolution: Fixed Votes: 0


 Description   

See: http://old.nabble.com/How-to-disable-the-default-include-exclude-patterns-from-the-test-task-td31950084.html

While no firm decision has been made to do this, a decision should be made either way prior to the 1.0 release if possible and acted upon.



 Comments   
Comment by Ric Klaren [ 29/Jun/11 ]

To disable the default exclude pattern you have to do something like:

test {
   exclude 'OhWhatASillyClassYouShallNeverFind'
} 

The behaviour now is to add the default include/exclude patterns when include/exclude are empty and scanForTestClasses=false.

This makes it 'hard' to get rid of the default exclude pattern.

Basically the exclude pattern is the one that is 'in the way' the most and the workaround to get rid of it is a bit silly. Leaving that one out would make me personally happy.

It would be nice to be able to say exclude = [] ( or should it be excludes = []? ) or to specify a property noDefaultTestPatterns.

Or leave them out altogether. Turning off scanForTestClasses already implies that you need to do something since you turned off some magic (at least to me it would).

Generated at Wed Jun 30 12:00:56 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.