Hi,
There is no such support at this time in Gradle core.
There is an open feature request for this, which also links to one way of working around that limitation:
https://github.com/gradle/gradle/issues/13162
You can also walk the dependency graph, find the enforced platform node and list its dependencies. That will give you a subset of the constraints from the platform since it will only show the ones that have a matching real dependency in the graph.
Look at
configuration.incoming.resolutionResult
as the starting point for this.