Skip to content
Permalink
Browse files

Shade argonaut-shapeless

And argonaut, shapeless, macro-compat, along with it.

So that downstream users don't run into conflicts with those.
  • Loading branch information...
alexarchambault committed May 20, 2019
1 parent 1606595 commit a6685e35654e29bbbbf32eade6e8d7b4d0874b2a
Showing with 33 additions and 3 deletions.
  1. +17 −3 build.sbt
  2. +15 −0 project/Settings.scala
  3. +1 −0 project/plugins.sbt
@@ -37,17 +37,28 @@ lazy val `joda-time` = project
)

lazy val render = crossProject(JVMPlatform, JSPlatform)
.jvmConfigure(_.enablePlugins(ShadingPlugin))
.dependsOn(core)
.jvmSettings(
shading("plotly.internals.shaded")
)
.settings(
shared,
plotlyPrefix,
libraryDependencies += Deps.argonautShapeless.value
plotlyPrefix
)
.jvmSettings(
libraryDependencies ++= Seq(
Deps.argonautShapeless.value % "shaded",
// depending on that one so that it doesn't get shaded
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
WebDeps.plotlyJs,
Deps.scalaTest % "test"
),
shadeNamespaces ++= Set(
"argonaut",
"macrocompat",
"shapeless"
),
resourceGenerators.in(Compile) += Def.task {
import sys.process._

@@ -73,7 +84,10 @@ lazy val render = crossProject(JVMPlatform, JSPlatform)
}
)
.jsSettings(
libraryDependencies += Deps.scalajsDom.value
libraryDependencies ++= Seq(
Deps.argonautShapeless.value,
Deps.scalajsDom.value
)
)

lazy val renderJvm = render.jvm
@@ -1,4 +1,6 @@

import com.typesafe.sbt.pgp._
import coursier.ShadingPlugin.autoImport._
import sbt._
import sbt.Keys._

@@ -150,4 +152,17 @@ object Settings {
}
}

def shading(namespace: String) =
inConfig(_root_.coursier.ShadingPlugin.Shading)(PgpSettings.projectSettings) ++
// Why does this have to be repeated here?
// Can't figure out why configuration gets lost without this in particular...
_root_.coursier.ShadingPlugin.projectSettings ++
Seq(
shadingNamespace := namespace,
publish := publish.in(Shading).value,
publishLocal := publishLocal.in(Shading).value,
PgpKeys.publishSigned := PgpKeys.publishSigned.in(Shading).value,
PgpKeys.publishLocalSigned := PgpKeys.publishLocalSigned.in(Shading).value
)

}
@@ -3,5 +3,6 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.27")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0")
addSbtPlugin("io.get-coursier" % "sbt-shading" % sbtCoursierVersion)

addSbtCoursier

0 comments on commit a6685e3

Please sign in to comment.
You can’t perform that action at this time.