Skip to content

Commit

Permalink
Added support for type attribute when parsing dependencies (#2994)
Browse files Browse the repository at this point in the history
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: #2994
  • Loading branch information
lefou authored Jan 29, 2024
1 parent cc332c9 commit 596e288
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scalalib/src/mill/scalalib/Dep.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
}
Expand Down

0 comments on commit 596e288

Please sign in to comment.