From e07ef2b7abb23ca4d5eff910350f64c143e23d9c Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 14 Sep 2022 10:09:25 -0400 Subject: [PATCH] Fixes https://github.com/dropbox/dependency-guard/issues/45 --- .../dependencyguard/internal/utils/JWDependencyTreeDiff.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/utils/JWDependencyTreeDiff.kt b/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/utils/JWDependencyTreeDiff.kt index 8c7f919..0c09f0e 100644 --- a/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/utils/JWDependencyTreeDiff.kt +++ b/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/utils/JWDependencyTreeDiff.kt @@ -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") @@ -22,8 +22,8 @@ internal fun dependencyTreeDiff(old: String, new: String): String { } private fun findDependencyPaths(text: String): Set> { - val dependencyLines = text.split('\n') - .dropWhile { !it.startsWith("+--- ") } + val dependencyLines = text.lines() + .dropWhile { !it.startsWith("+--- ") && !it.startsWith("\\---") } .takeWhile { it.isNotEmpty() } val dependencyPaths = mutableSetOf>()