Listing dependencies included into an enforced platform

Hello, in my Gradle plugin I need to be able to analyze dependencies included into the enforced platforms the user has configured for the project. Basically, I need the complete list of the dependencies included in a given enforced platform.
I am currently locating the enforced platforms by looking for ModuleDependency with Category.ENFORCED_PLATFORM among the project dependencies. That works. What would be the best way to get their effective content?
Thanks!