Unable to exclude test files

Currently configuring sonar within an android project in gradle and i do the following

property "sonar.test.exclusions", "**/*ActivityTest.kt"

since these are espresso tests and wont play nice with sonar. however, no matter what i do it doesn’t exclude them. any insight anyone can offer?

I also should note i have sonar.tests set to “src/test/java” and the tests in question are in “/src/sharedTest/java” so i’m not sure why it is even including the file to begin with

If sonar.tests is set to src/test/java, then I infer that these *ActivityTest.kt files are imported as source files if you see them in SonarCloud. This would explain why setting sonar.test.exclusions has no effect in your situation.

Can you please detail what the value of sonar.sources is in your project?