Merge pull request #6456 from guilgaly/coursier-ivy-dependency-classifier

Retain classifiers for transitive dependencies when publishing to Ivy using Coursier
This commit is contained in:
eugene yokota 2021-04-19 10:13:17 -04:00 committed by GitHub
commit 943677ed9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -152,6 +152,18 @@ object IvyXml {
val dependencyElems = project.dependencies.toVector.map {
case (conf, dep) =>
val classifier = {
val pub = dep.publication
if (pub.classifier.value.nonEmpty)
Seq(
<artifact name={pub.name} type={pub.`type`.value} ext={pub.ext.value} conf="*" e:classifier={
pub.classifier.value
} />
)
else
Seq.empty
}
val excludes = dep.exclusions.toSeq.map {
case (org, name) =>
<exclude org={org.value} module={name.value} name="*" type="*" ext="*" conf="" matcher="exact"/>
@ -161,6 +173,7 @@ object IvyXml {
<dependency org={dep.module.organization.value} name={dep.module.name.value} rev={
dep.version
} conf={s"${conf.value}->${dep.configuration.value}"}>
{classifier}
{excludes}
</dependency>