How to plug a PostDiscoveryFilter to the test task?

I want to implement a PostDiscoveryFilter to filter out some test classes. But I couldn’t find away to plug such a custom implementation to the test task. Is it possible?

That question has nothing to do with Gradle. Gradle just kicks off the JUnit platform and has no influence on the filters. You probably need to add it as test code and somehow register it, but you need to check with JUnit.

Thanks for the clarification. It makes sense.

1 Like