Skip to content

Commit

Permalink
Make simulacrum a compile time only dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
takayahilton committed Nov 20, 2019
1 parent 7623120 commit 2b607bd
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import sbt.Keys.libraryDependencies
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
import sbtcrossproject.CrossPlugin.autoImport.{CrossType, crossProject}
import MimaSettings.mimaSettings

import scala.xml.transform.{RewriteRule, RuleTransformer}

name := "scala-uri root"
scalaVersion in ThisBuild := "2.13.0"
crossScalaVersions in ThisBuild := Seq("2.12.10", "2.13.1")
Expand Down Expand Up @@ -33,12 +35,24 @@ val sharedSettings = Seq(
libraryDependencies ++= Seq(
"org.parboiled" %%% "parboiled" % "2.1.8",
"com.chuusai" %%% "shapeless" % "2.3.3",
"org.typelevel" %%% "simulacrum" % "1.0.0",
"org.scalatest" %%% "scalatest" % "3.0.8" % "test"
"org.typelevel" %%% "simulacrum" % "1.0.0" % Provided,
"org.scalatest" %%% "scalatest" % "3.0.8" % Test
),
libraryDependencies ++= paradisePlugin.value,
parallelExecution in Test := false,
scalafmtOnCompile := true
scalafmtOnCompile := true,
pomPostProcess := { node =>
new RuleTransformer(new RewriteRule {
override def transform(node: xml.Node): Seq[xml.Node] = node match {
case e: xml.Elem
if e.label == "dependency" &&
e.child.exists(child => child.label == "groupId" && child.text == "org.typelevel") &&
e.child.exists(child => child.label == "artifactId" && child.text.startsWith("simulacrum_")) =>
Nil
case _ => Seq(node)
}
}).transform(node).head
}
)

val jvmSettings = Seq(
Expand Down

0 comments on commit 2b607bd

Please sign in to comment.