mirror of
https://github.com/sbt/sbt.git
synced 2026-10-06 18:14:04 +02:00
Merge pull request #614 from coursier/topic/fix-compatibility-api
Fix compatibility API
This commit is contained in:
@@ -281,7 +281,7 @@ final case class MavenSource(
|
||||
k -> other.extra.get(k).fold(v)(merge(v, _))
|
||||
} ++
|
||||
other.extra
|
||||
.filterKeys(k => !a.extra.contains(k))
|
||||
.filterKeys(k => !a.extra.contains(k) && k != Artifact.optionalKey)
|
||||
|
||||
a.copy(
|
||||
checksumUrls = other.checksumUrls ++ a.checksumUrls,
|
||||
|
||||
+1
-1
Submodule tests/metadata updated: ac3871c925...93eccec4ff
@@ -804,6 +804,23 @@ abstract class CentralTests extends TestSuite {
|
||||
val mainArtifactOpt = artifacts.find(_.url == mainUrl)
|
||||
assert(mainArtifactOpt.isEmpty)
|
||||
}
|
||||
|
||||
* - {
|
||||
if (isActualCentral)
|
||||
withArtifacts(Module("com.lihaoyi", "scalatags_2.12"), "0.6.2", "jar", transitive = true, optional = false) { artifacts =>
|
||||
|
||||
assert(artifacts.forall(!_.isOptional))
|
||||
|
||||
val urls = artifacts.map(_.url).toSet
|
||||
|
||||
val expectedUrls = Set(
|
||||
"https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.0/scala-library-2.12.0.jar",
|
||||
"https://repo1.maven.org/maven2/com/lihaoyi/sourcecode_2.12/0.1.3/sourcecode_2.12-0.1.3.jar",
|
||||
"https://repo1.maven.org/maven2/com/lihaoyi/scalatags_2.12/0.6.2/scalatags_2.12-0.6.2.jar"
|
||||
)
|
||||
assert(urls == expectedUrls)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user