void (@NotNull Collection<ExternalDependency> result, @NotNull LenientConfiguration lenientConfiguration, @Nullable String scope) { Set<UnresolvedDependency> unresolvedModuleDependencies = lenientConfiguration.getUnresolvedModuleDependencies(); for (UnresolvedDependency unresolvedDependency : unresolvedModuleDependencies) { MyModuleVersionSelector myModuleVersionSelector = null; Throwable problem = unresolvedDependency.getProblem(); if (problem.getCause() != null) { problem = problem.getCause(); } try { if (problem instanceof ModuleVersionResolveException) { ComponentSelector componentSelector = ((ModuleVersionResolveException)problem).getSelector(); if (componentSelector instanceof ModuleComponentSelector) { ModuleComponentSelector moduleComponentSelector = (ModuleComponentSelector)componentSelector; myModuleVersionSelector = new MyModuleVersionSelector(moduleComponentSelector.getModule(), moduleComponentSelector.getGroup(), moduleComponentSelector.getVersion()); } } } catch (Throwable ignore) { } if (myModuleVersionSelector == null) { problem = unresolvedDependency.getProblem(); ModuleVersionSelector selector = unresolvedDependency.getSelector(); myModuleVersionSelector = new MyModuleVersionSelector(selector.getName(), selector.getGroup(), selector.getVersion()); } DefaultUnresolvedExternalDependency dependency = new DefaultUnresolvedExternalDependency(); dependency.setName(myModuleVersionSelector.name); dependency.setGroup(myModuleVersionSelector.group); dependency.setVersion(myModuleVersionSelector.version); dependency.setScope(scope); dependency.setFailureMessage(problem.getMessage()); result.add(dependency); } }