Collection<ExternalDependency> (@Nullable String configurationName) { if (!IS_NEW_DEPENDENCY_RESOLUTION_APPLICABLE) { //noinspection deprecation return new DeprecatedDependencyResolver(myContext, myProject, false, myDownloadJavadoc, myDownloadSources) .resolveDependencies(configurationName); } if (configurationName == null) return emptyList(); Collection<ExternalDependency> dependencies = resolveDependencies(myProject.getConfigurations().findByName(configurationName), null); int order = 0; for (ExternalDependency dependency : dependencies) { ((AbstractExternalDependency)dependency).setClasspathOrder(++order); } return dependencies; }