Skip to content

Commit

Permalink
Fixes #45
Browse files Browse the repository at this point in the history
  • Loading branch information
handstandsam committed Sep 14, 2022
1 parent d5f2420 commit e07ef2b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package com.dropbox.gradle.plugins.dependencyguard.internal.utils
/**
* Original Source:
*
* https://github.com/JakeWharton/dependency-tree-diff/blob/2548d3e95aa709c2c2b95ed61241a49bfadddd72/src/main/kotlin/com/jakewharton/gradle/dependencies/treeDiff.kt
* https://github.com/JakeWharton/dependency-tree-diff/blob/4e86e45bbb032535d8106aec2811399f4bce7b49/src/main/kotlin/com/jakewharton/gradle/dependencies/treeDiff.kt
*/

@JvmName("diff")
Expand All @@ -22,8 +22,8 @@ internal fun dependencyTreeDiff(old: String, new: String): String {
}

private fun findDependencyPaths(text: String): Set<List<String>> {
val dependencyLines = text.split('\n')
.dropWhile { !it.startsWith("+--- ") }
val dependencyLines = text.lines()
.dropWhile { !it.startsWith("+--- ") && !it.startsWith("\\---") }
.takeWhile { it.isNotEmpty() }

val dependencyPaths = mutableSetOf<List<String>>()
Expand Down

0 comments on commit e07ef2b

Please sign in to comment.