mirror of
https://github.com/sbt/sbt.git
synced 2026-09-04 16:54:29 +02:00
Fix parsing of dependencies config mapping of Ivy files
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package coursier
|
||||
|
||||
import coursier.ivy.IvyRepository
|
||||
import coursier.ivy.{ IvyXml, IvyRepository }
|
||||
import sbt.mavenint.SbtPomExtraProperties
|
||||
import sbt.{ Resolver, CrossVersion, ModuleID }
|
||||
|
||||
@@ -24,19 +24,6 @@ object FromSbt {
|
||||
case f: CrossVersion.Binary => name + "_" + f.remapVersion(scalaBinaryVersion)
|
||||
}
|
||||
|
||||
def mappings(mapping: String): Seq[(String, String)] =
|
||||
mapping.split(';').flatMap { m =>
|
||||
val (froms, tos) = m.split("->", 2) match {
|
||||
case Array(from) => (from, "default(compile)")
|
||||
case Array(from, to) => (from, to)
|
||||
}
|
||||
|
||||
for {
|
||||
from <- froms.split(',')
|
||||
to <- tos.split(',')
|
||||
} yield (from.trim, to.trim)
|
||||
}
|
||||
|
||||
def attributes(attr: Map[String, String]): Map[String, String] =
|
||||
attr.map { case (k, v) =>
|
||||
k.stripPrefix("e:") -> v
|
||||
@@ -64,7 +51,7 @@ object FromSbt {
|
||||
)
|
||||
|
||||
val mapping = module.configurations.getOrElse("compile")
|
||||
val allMappings = mappings(mapping)
|
||||
val allMappings = IvyXml.mappings(mapping)
|
||||
|
||||
val attributes =
|
||||
if (module.explicitArtifacts.isEmpty)
|
||||
|
||||
Reference in New Issue
Block a user