Gradle API to read maven-metadata.xml?


I would like to in some way access the info in maven-metadata.xml like the tag “lastUpdated”.
Is there some API in Gradle for that?

I would like to build a plugin that list how old a release of a dependency is so that I can assess the “operation risk” that potential stale/outdated/unsupported dependents are.

Many thanks