Skip to content

Commit

Permalink
Merge pull request #545 from eed3si9n/wip/bom-opt-out
Browse files Browse the repository at this point in the history
Expose enableDependencyOverrides flag
  • Loading branch information
eed3si9n authored Dec 22, 2024
2 parents 4060c11 + 0133887 commit 4d560ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ import java.net.URLClassLoader
protocolHandlerDependencies: Seq[ModuleID] = Vector.empty,
retry: Option[(FiniteDuration, Int)] = None,
sameVersions: Seq[Set[InclExclRule]] = Nil,
@since
enableDependencyOverrides: Option[Boolean] = None,
)
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class CoursierDependencyResolution(
.withMaxIterations(conf.maxIterations)
.withProfiles(conf.mavenProfiles.toSet)
.withForceVersion(conf.forceVersions.map { case (k, v) => (ToCoursier.module(k), v) }.toMap)
.withEnableDependencyOverrides(conf.enableDependencyOverrides)
.withTypelevel(typelevel)
.withReconciliation(ToCoursier.reconciliation(conf.reconciliation))
.withExclusions(excludeDependencies)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ package object syntax {
protocolHandlerDependencies = Vector.empty,
retry = None,
sameVersions = Nil,
enableDependencyOverrides = None,
)
}

Expand Down Expand Up @@ -112,6 +113,8 @@ package object syntax {

def withRetry(retry: (FiniteDuration, Int)): CoursierConfiguration =
value.withRetry(Some((retry._1, retry._2)))
def withEnableDependencyOverrides(enable: Boolean): CoursierConfiguration =
value.withEnableDependencyOverrides(Some(enable))
}

implicit class PublicationOp(value: Publication) {
Expand Down

0 comments on commit 4d560ec

Please sign in to comment.