Object (@NotNull String modelName, @NotNull Project project, @NotNull ModelBuilderContext context) { Map<String, String> result = new HashMap<>(); SettingsInternal settings = ((GradleInternal)project.getGradle()).getSettings(); MutableVersionCatalogContainer catalogs = settings.getDependencyResolutionManagement().getVersionCatalogs(); for (VersionCatalogBuilder builder : catalogs) { if (!(builder instanceof DefaultVersionCatalogBuilder)) { continue; } DefaultVersionCatalogBuilder catalogBuilder = (DefaultVersionCatalogBuilder)builder; catalogBuilder.build(); // trigger resolution, if not resolved yet. String name = catalogBuilder.getName(); DependencyResolutionServices service = extractDependencyResolutionService(catalogBuilder); if (service == null) { continue; } try { Configuration catalogImportConf = service.getConfigurationContainer() .getByName("incomingCatalogFor" + capitalize(name) + "0"); for (ResolvedArtifactResult artifact : catalogImportConf.getIncoming().getArtifacts().getArtifacts()) { result.put(name, artifact.getFile().getAbsolutePath().replace('\\', '/')); } } catch (UnknownConfigurationException ignore) { } } return new VersionCatalogsModelImpl(result); }