Version Catalog - how to access all defined versions

Hi,

I want to iterate over all versions defined in the catalog with kotlin (to generate some output if they match a certain prefix), how can this be done - the libs accessor has all my concrete versions, but I don’t find one, which return all where I can filter / collect what I need - I guess it is trivial but I missed it, anyone an idea?

Thanks.

The libs... accessors do not have a way to list things, just access specific ones.
But you can use the VersionCatalogsExtension like versionCatalogs.named("libs").versionAliases.

1 Like