Gradle requires matching test classes when using options.suiteXmlFiles

I have an xml file with the list of test classes and I only want to run the tests specified in that file using TestNG. I do it by setting options.suiteXmlFiles. By default it still runs other tests too because it scans all test classes too. If I add a exclude everything rule or include rule that does not match anything, it does not run anything at all because it thinks there are no tests, even though options.suiteXmlFiles is specified. The only option I’ve found is to make a test class with an empty test and explicitly include that, so it actually runs till the point where it parses the xml file.

This happens on both 1.10 and 2.0-rc-1.

Would you mind providing us with an example project that reproduces the issue?