Skip to content

Commit

Permalink
Shade the ujson dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrf committed Dec 5, 2023
1 parent 8f4dcc1 commit b66ea5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,25 @@ lazy val root = (project in file("."))
)

lazy val `sbt-version-policy` = project
.enablePlugins(SbtPlugin)
.enablePlugins(SbtPlugin, ShadingPlugin)
.settings(
scriptedLaunchOpts += "-Dplugin.version=" + version.value,
scriptedBufferLog := false,
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3"),
libraryDependencies ++= Seq(
"io.get-coursier" % "interface" % "1.0.18",
"io.get-coursier" %% "versions" % "0.3.1",
"com.lihaoyi" %% "ujson" % "3.1.3", // TODO shade
"com.lihaoyi" %% "ujson" % "3.1.3",
"com.eed3si9n.verify" %% "verify" % "2.0.1" % Test,
),
shadedModules += "com.lihaoyi" %% "ujson",
shadingRules ++= Seq(
ShadingRule.moveUnder("ujson", "sbtversionpolicy.internal.shaded"),
ShadingRule.moveUnder("upickle", "sbtversionpolicy.internal.shaded"),
ShadingRule.moveUnder("geny", "sbtversionpolicy.internal.shaded"),
),
validNamespaces ++= Set("sbtversionpolicy", "com", "com.typesafe", "sbt"),
validEntries += "utf8.json",
testFrameworks += new TestFramework("verify.runner.Framework"),
mimaBinaryIssueFilters ++= Seq(
// Add Mima filters here
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value

addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "2.1.3")

addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.1")

0 comments on commit b66ea5b

Please sign in to comment.