# exclude

open fun exclude(excludes: Array<String>): Test(source)
open fun exclude(excludes: Iterable<String>): Test(source)

Adds exclude patterns for the files in the test classes directory (e.g. '**/*Test.class')).

#### See also

setExcludes(Iterable)

open fun exclude(excludeSpec: Spec<FileTreeElement>): Test(source)

Adds an exclude spec. This method may be called multiple times to append new specs. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.

open fun exclude(excludeSpec: Closure): Test(source)

Adds an exclude spec. This method may be called multiple times to append new specs.The given closure is passed a as its parameter. The closure should return true or false. Example:

    copySpec {
      from 'source'
      into 'destination'
      //an example of excluding files from certain configuration:
      exclude { it.file in configurations.someConf.files }
    }

Content copied to clipboard
If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.