private @NotNull Collection<? extends ExternalDependency> getDependencies(
    @NotNull Iterable<?> fileCollections,
    @NotNull String scope
  ) {
    Set<ExternalDependency> result = new LinkedHashSet<>();
    for (Object fileCollection : fileCollections) {
      if (fileCollection instanceof FileCollection) {
        result.addAll(getDependencies((FileCollection)fileCollection, scope));
      }
    }
    return result;
  }
private @NotNull Collection<? extends ExternalDependency> getDependencies(
    @NotNull Iterable<?> fileCollections,
    @NotNull String scope
  )