Hey,
The (..., configuration = "...")
way to declare a dependency by referring to a ‘configuration’ in another project directly is rather outdated (IMO it should be deprecated). Instead you should use Attributes and/or Capabilities as concepts of the Variant Aware Dependency Management.
In your use case, you should use Capabilities. Which you may do indirectly either by using the java-test-fixtures
plugin or java.registerFeature(...)
.
I explain this further in this video (example project on GitHub is linked in the description):
Hope this helps.