How to test a specific package?

Hi if I have a Java package structure like so:

a
a.b
a.b.c

and I want to run tests only under a.* but not a.b.* or a.b.c.* then how do I do that with “./gradlew test”?

As I understand ./gradlew test --tests <pattern> only has wildcards so there is no way to specify something like ./gradlew test --tests "a.*" --exclude "a.*.*"