sortDependencies function

Set<DependencyConfig> sortDependencies(
  1. List<DependencyConfig> deps
)

Implementation

Set<DependencyConfig> sortDependencies(List<DependencyConfig> deps) {
  // sort dependencies alphabetically
  deps.sort((a, b) => a.type.name.compareTo(b.type.name));
  // sort dependencies by their register order
  final Set<DependencyConfig> sorted = {};
  _sortByDependents(deps.toSet(), sorted);
  return sorted;
}