public @NotNull Collection<ExternalDependency> resolveDependencies(@NotNull SourceSet sourceSet) {
    Collection<? extends ExternalDependency> compileDependencies = resolveSourceSetCompileDependencies(sourceSet);
    Collection<? extends ExternalDependency> runtimeDependencies = resolveSourceSetRuntimeDependencies(sourceSet);
    Collection<? extends ExternalDependency> dependencies = mergeResolvedDependencies(compileDependencies, runtimeDependencies);
    Collection<? extends ExternalDependency> providedDependencies = resolveSourceSetProvidedDependencies(sourceSet, dependencies);

    Collection<ExternalDependency> result = new LinkedHashSet<>();
    result.addAll(dependencies);
    result.addAll(providedDependencies);

    int order = 0;
    for (ExternalDependency dependency : result) {
      ((AbstractExternalDependency)dependency).setClasspathOrder(++order);
    }
    return result;
  }
public @NotNull Collection<ExternalDependency> resolveDependencies(@NotNull SourceSet sourceSet)