You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
case (None, None) =>Success(EqualVersionSpecified)
28
-
case (Some(l), None) =>Success(LeftVersion)
29
-
case (None, Some(r)) =>Success(RightVersion)
30
-
case (Some(l), Some(r)) if (l == r) =>Success(EqualVersionSpecified)
31
-
case (Some(l), Some(r)) => {
32
-
println(
33
-
s"This should probably not be allowed... but we are going to pick a version conflict ${versionConflictPolicy} if we can for $dependencyName between $l, $r"
34
-
)
35
-
versionConflictPolicy.resolve(
36
-
None,
37
-
Set(Version(l), Version(r))
38
-
) match {
39
-
caseValidated.Valid(v) =>
40
-
if (v.asString == l) {
41
-
Success(LeftVersion)
42
-
} else {
43
-
Success(RightVersion)
44
-
}
45
-
caseValidated.Invalid(iv) =>
46
-
Failure(newException(s"Unable ot combine versions, $iv"))
47
-
}
48
-
}
30
+
case (_, _) if (left == right) =>Success(EqualVersionSpecified)
31
+
case (Some(_), None) =>Success(LeftVersion)
32
+
case (None, Some(_)) =>Success(RightVersion)
33
+
case (Some(l), Some(r)) =>
34
+
versionConflictPolicy
35
+
.resolve(None, Set(Version(l), Version(r))) match {
36
+
caseValidated.Valid(v) =>
37
+
valvstr= v.asString
38
+
logger.debug(
39
+
s"Using ${versionConflictPolicy} for $dependencyName with versions $l and $r picking $vstr"
40
+
)
41
+
42
+
valver=
43
+
if (vstr == l) LeftVersion
44
+
elseRightVersion
45
+
46
+
Success(ver)
47
+
caseValidated.Invalid(iv) =>
48
+
Failure(newException(s"For $dependencyName unable to combine versions $l and $r. Error: $iv"))
49
+
}
49
50
}
50
51
}
51
52
@@ -68,7 +69,7 @@ object GradleLockDependency {
68
69
_ <-if (left.project == right.project) unit
69
70
elseFailure(
70
71
newException(
71
-
s"Unable to merge due to incompatible project setting, had $left, $right"
72
+
s"Unable to merge due to incompatible project setting in $debugName, had $left, $right"
72
73
)
73
74
)
74
75
v <- resolveVersions(versionConflictPolicy, debugName.getOrElse("Unknown"))(left.locked, right.locked)
0 commit comments