Skip to content

Commit 35a8d61

Browse files
authored
Fix duplicated tree links in Gradle 8.10 (#258)
1 parent f47277a commit 35a8d61

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ build/
33
out/
44

55
.idea/
6-
*.iml
6+
*.iml
7+
8+
local.properties

src/main/kotlin/com/vanniktech/dependency/graph/generator/ProjectDependencyGraphGenerator.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ internal class ProjectDependencyGraphGenerator(
7676
val rootNodes: List<MutableNode> = graph.rootNodes().filterNotNull().filter { it.links().isEmpty() }
7777
dependencies
7878
.filterNot { (from, to, _) -> from == to }
79+
.distinctBy { it.from.path to it.to.path }
7980
.forEach { (from, to, configuration) ->
8081
val fromNode = rootNodes.single { it.name().toString() == from.path }
8182
val toNode = rootNodes.singleOrNull { it.name().toString() == to.path } ?: return@forEach

0 commit comments

Comments
 (0)