Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make simulacrum a compile time only dependency. #86

Merged
merged 1 commit into from
Nov 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import sbt.Keys.libraryDependencies
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
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