ExternalDepsResolutionResult (@Nullable Configuration configuration, @Nullable String scope) { if (configuration == null || configuration.getAllDependencies().isEmpty()) { return ExternalDepsResolutionResult.EMPTY; } final ExternalDepsResolutionResult result; if (!myIsPreview && isArtifactResolutionQuerySupported) { result = new ArtifactQueryResolver(myContext, configuration, scope, myProject, myDownloadJavadoc, myDownloadSources).resolve(); } else { result = new ExternalDepsResolutionResult(findDependencies(configuration, configuration.getAllDependencies(), scope), new ArrayList<>()); } Set<ExternalDependency> fileDependencies = findAllFileDependencies(configuration.getAllDependencies(), scope); result.getExternalDeps().addAll(fileDependencies); return result; }