How can one exclude a test file from 1 of the subProjects in a multi module project?

so we have a multi module project with 50+ modules, each of them containing tests. when we run gradle test all of them get executed nicely, my question is how we could exclude 1 test file from 1 of the subprojects?

All examples online seem to only work in a single module project as we cannot exclude tests from the rootProject.

Hopefully someone has an example on how to do this.

It is not fully clear what you are asking.
If you mean from the command line, I don’t think there is any way built-in to exclude any task, only to select specific tasks to run.
If you mean programmatically, you could simply annotate that class with @Ignore or the according way of your test framework.
If you really want to do it via Gradle configuration, just configure the test task of the respective project with your exclude.