[Gradle][MPP] Increase test failure readability in reportSourceSetCommonizerDependencies
This commit is contained in:
committed by
Space
parent
3c8a4c5896
commit
e6f04c84fa
+10
-2
@@ -92,12 +92,20 @@ data class SourceSetCommonizerDependencies(
|
|||||||
|
|
||||||
if (unmatchedDependencies.isNotEmpty() || unmatchedMatchers.isNotEmpty()) {
|
if (unmatchedDependencies.isNotEmpty() || unmatchedMatchers.isNotEmpty()) {
|
||||||
fail(buildString {
|
fail(buildString {
|
||||||
|
fun appendLineIndented(value: Any?) = appendLine(value.toString().prependIndent(" "))
|
||||||
|
|
||||||
appendLine("$sourceSetName: Set of commonizer dependencies does not match given 'fileMatchers'")
|
appendLine("$sourceSetName: Set of commonizer dependencies does not match given 'fileMatchers'")
|
||||||
if (unmatchedDependencies.isNotEmpty()) {
|
if (unmatchedDependencies.isNotEmpty()) {
|
||||||
appendLine("Unmatched dependencies: $unmatchedDependencies")
|
appendLine("Unmatched dependencies:")
|
||||||
|
unmatchedDependencies.forEach { dependency ->
|
||||||
|
appendLineIndented(dependency)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (unmatchedMatchers.isNotEmpty()) {
|
if (unmatchedMatchers.isNotEmpty()) {
|
||||||
appendLine("Unmatched fileMatchers: $unmatchedMatchers")
|
appendLine("Unmatched fileMatchers:")
|
||||||
|
unmatchedMatchers.forEach { matcher ->
|
||||||
|
appendLineIndented(matcher)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user