Skip to content

Commit

Permalink
Merge pull request #145 from fd4s/remove-scoped-dependencies-pom
Browse files Browse the repository at this point in the history
Change to not include scoped dependencies in pom
  • Loading branch information
vlovgr authored Jan 21, 2020
2 parents 1662a96 + eb7813e commit 7c619f2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,19 @@ lazy val dependencySettings = Seq(
"org.typelevel" %% "cats-testkit" % catsVersion,
"org.slf4j" % "slf4j-nop" % "1.7.30"
).map(_ % Test),
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.11.0" cross CrossVersion.full)
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.11.0" cross CrossVersion.full),
pomPostProcess := { (node: xml.Node) =>
new xml.transform.RuleTransformer(new xml.transform.RewriteRule {
def scopedDependency(e: xml.Elem): Boolean =
e.label == "dependency" && e.child.exists(_.label == "scope")

override def transform(node: xml.Node): xml.NodeSeq =
node match {
case e: xml.Elem if scopedDependency(e) => Nil
case _ => Seq(node)
}
}).transform(node).head
}
)

lazy val mdocSettings = Seq(
Expand Down

0 comments on commit 7c619f2

Please sign in to comment.