From 596e28863452bf5c31459fa84750c6ec5efea363 Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Tue, 30 Jan 2024 00:34:23 +0100 Subject: [PATCH] Added support for `type` attribute when parsing dependencies (#2994) This ensures, that we can populate the `type` attribute to be used by coursier. I have not checked whether this is self-complete to work with other dependency type. Maybe, we need some follow up PRs to refine it. Pull request: https://github.com/com-lihaoyi/mill/pull/2994 --- scalalib/src/mill/scalalib/Dep.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/scalalib/src/mill/scalalib/Dep.scala b/scalalib/src/mill/scalalib/Dep.scala index ecb286ea3b2..2e37bae96bb 100644 --- a/scalalib/src/mill/scalalib/Dep.scala +++ b/scalalib/src/mill/scalalib/Dep.scala @@ -109,6 +109,7 @@ object Dep { val attributes = parts.tail.foldLeft(coursier.Attributes()) { (as, s) => s.split('=') match { case Array("classifier", v) => as.withClassifier(coursier.Classifier(v)) + case Array("type", v) => as.withType(coursier.Type(v)) case Array(k, v) => throw new Exception(s"Unrecognized attribute: [$s]") case _ => throw new Exception(s"Unable to parse attribute specifier: [$s]") }