Skip to content

Commit

Permalink
Sort output of graphView tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
seregamorph authored and autonomousapps committed Jul 13, 2024
1 parent d9710eb commit 34eaa01
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,15 @@ internal class GraphViewBuilder(
.filterNot { it.isJavaPlatform() }
// Sometimes there is a self-dependency?
.filterNot { it.toCoordinates() == rootId }
.forEach { dependencyResult ->
.map {
// Might be from an included build, in which case the coordinates reflect the _requested_ dependency instead of
// the _resolved_ dependency.
val depId = dependencyResult.toCoordinates()

Pair(it, it.toCoordinates())
}
// make reproducible output friendly to compare between executions
.sortedWith(compareBy<Pair<ResolvedDependencyResult, Coordinates>> { pair -> pair.second.javaClass.simpleName }
.thenComparing { pair -> pair.second.identifier })
.forEach { (dependencyResult, depId) ->
// add an edge
graphBuilder.putEdge(rootId, depId)

Expand Down

0 comments on commit 34eaa01

Please sign in to comment.