A fix is now complete and committed. It uses a list of globally defined Java regexp patterns to determine which jars should not be deployed.
The list is configured with these defaults:
I didn't add any of the mentioned 'test' jars because I thought it best to keep this list as small as possible.
Mainly, because, if it were to accidentally capture things that should actually be deployed, it could lead to some very unintuitive 'class not found' exceptions.
Thus I've only excluded the jars that seem to actually break the app when it is running on the server.
If you are not happy with the list of exclusions as is, it can be edited via a preferences page under "Preferences >> Gradle >> WTP".
I can add more items to default, but I do worry about adding something like "geb.*\.jar" because its only three letters so the risk of an accidental mismatch could be quite high.