Skip to content

Commit

Permalink
#18 fixed dependency order
Browse files Browse the repository at this point in the history
  • Loading branch information
wuetherich committed Mar 25, 2020
1 parent 94e3774 commit dbd67d2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import io.codekontor.slizaa.hierarchicalgraph.core.model.HGProxyDependency;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -80,7 +81,11 @@ public List<Dependency> resolvedDependencies() {
proxyDependency.resolve();
}
List<HGCoreDependency> coreDependencies = ((HGProxyDependency)_hgDependency).getAccumulatedCoreDependencies();
return coreDependencies.stream().map(coreDep -> new Dependency(coreDep)).collect(Collectors.toList());
return coreDependencies.stream()
.map(coreDep -> new Dependency(coreDep))

.sorted(Comparator.comparing(dep -> dep.getSourceNode().getText() + dep.getType() + dep.getTargetNode()))
.collect(Collectors.toList());
}
return Collections.emptyList();
}
Expand Down

0 comments on commit dbd67d2

Please sign in to comment.