private @NotNull Collection<ExternalDependency> resolveDependencies(
    @NotNull Configuration configuration,
    @NotNull String scope
  ) {
    GradleDependencyResolver dependencyResolver = new GradleDependencyResolver(myContext, myProject);
    Collection<ExternalDependency> dependencies = dependencyResolver.resolveDependencies(configuration);
    for (ExternalDependency dependency : dependencies) {
      ((AbstractExternalDependency)dependency).setScope(scope);
    }
    Collection<FileCollectionDependency> runtimeDependencies =
      RUNTIME_SCOPE.equals(scope)
      ? resolveSourceSetOutputDirsRuntimeFileDependencies(dependencies)
      : Collections.emptySet();

    List<ExternalDependency> result = new ArrayList<>();
    result.addAll(runtimeDependencies);
    result.addAll(dependencies);
    return result;
  }
private @NotNull Collection<ExternalDependency> resolveDependencies(
    @NotNull Configuration configuration,
    @NotNull String scope
  )