private static @NotNull Collection<ExternalDependency> resolveSourceOutputFileDependencies(
    @NotNull SourceSetOutput sourceSetOutput,
    @NotNull String scope
  ) {
    Collection<ExternalDependency> result = new ArrayList<>(2);
    List<File> files = new ArrayList<>(sourceSetOutput.getClassesDirs().getFiles());
    files.add(sourceSetOutput.getResourcesDir());
    DefaultFileCollectionDependency fileCollectionDependency = new DefaultFileCollectionDependency(files);
    fileCollectionDependency.setScope(scope);
    result.add(fileCollectionDependency);

    if (RUNTIME_SCOPE.equals(scope)) {
      ExternalDependency runtimeDependency = resolveSourceSetOutputDirsRuntimeFileDependency(sourceSetOutput);
      if (runtimeDependency != null) {
        result.add(runtimeDependency);
      }
    }
    return result;
  }
private static @NotNull Collection<ExternalDependency> resolveSourceOutputFileDependencies(
    @NotNull SourceSetOutput sourceSetOutput,
    @NotNull String scope
  )