mirror of https://github.com/sbt/sbt.git
write info.apiURL to ivy.xml
Ref https://github.com/coursier/coursier/issues/1123
This commit is contained in:
parent
38f94a6e31
commit
21782a51f0
|
|
@ -38,16 +38,22 @@ private[sbt] object LMCoursier {
|
|||
|
||||
def coursierProjectTask: Def.Initialize[sbt.Task[CProject]] =
|
||||
Def.task {
|
||||
Inputs.coursierProject(
|
||||
val auOpt = apiURL.value
|
||||
val proj = Inputs.coursierProject(
|
||||
projectID.value,
|
||||
allDependencies.value,
|
||||
excludeDependencies.value,
|
||||
// should projectID.configurations be used instead?
|
||||
ivyConfigurations.value,
|
||||
scalaVersion.value,
|
||||
scalaBinaryVersion.value,
|
||||
streams.value.log
|
||||
)
|
||||
auOpt match {
|
||||
case Some(au) =>
|
||||
val props = proj.properties :+ ("info.apiURL" -> au.toString)
|
||||
proj.copy(properties = props)
|
||||
case _ => proj
|
||||
}
|
||||
}
|
||||
|
||||
def coursierConfigurationTask(
|
||||
|
|
|
|||
|
|
@ -91,10 +91,11 @@ object IvyXml {
|
|||
}
|
||||
)
|
||||
|
||||
val infoAttrs = project.module.attributes.foldLeft[xml.MetaData](xml.Null) {
|
||||
case (acc, (k, v)) =>
|
||||
new PrefixedAttribute("e", k, v, acc)
|
||||
}
|
||||
val infoAttrs =
|
||||
(project.module.attributes.toSeq ++ project.properties).foldLeft[xml.MetaData](xml.Null) {
|
||||
case (acc, (k, v)) =>
|
||||
new PrefixedAttribute("e", k, v, acc)
|
||||
}
|
||||
|
||||
val licenseElems = project.info.licenses.map {
|
||||
case (name, urlOpt) =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue