private @NotNull Collection<FileCollectionDependency> resolveSourceSetOutputDirsRuntimeFileDependencies(
    @NotNull Collection<ExternalDependency> dependencies
  ) {
    Collection<FileCollectionDependency> result = new LinkedHashSet<>();
    for (ExternalDependency dependency : dependencies) {
      if (dependency instanceof ExternalProjectDependency) {
        ExternalProjectDependency projectDependency = (ExternalProjectDependency)dependency;
        for (File artifactFile : projectDependency.getProjectDependencyArtifacts()) {
          SourceSet sourceSet = mySourceSetArtifactIndex.findByArtifact(artifactFile.getPath());
          if (sourceSet != null) {
            FileCollectionDependency runtimeDependency = resolveSourceSetOutputDirsRuntimeFileDependency(sourceSet.getOutput());
            if (runtimeDependency != null) {
              result.add(runtimeDependency);
            }
          }
        }
      }
    }
    return result;
  }
private @NotNull Collection<FileCollectionDependency> resolveSourceSetOutputDirsRuntimeFileDependencies(
    @NotNull Collection<ExternalDependency> dependencies
  )