How can we use the programmatic "include" files syntax for sourceSets?

referenced from here : http://forums.gradle.org/gradle/topics/can_i_directly_specify_groovy_scripts_to_include_in_sourcesets_rather_than_combining_include_exclude_statements?rfm=1

I’d like to use “include { File file -> … }”, to define a source set with exactly two .groovy files which I know the exact name of.

Easier to use the glob filters in this case. With the programmatic filters, you’ll need to return ‘true’ or ‘false’ for each ‘File’ passed into the closure.