Last active
December 22, 2017 13:25
-
-
Save erip/aeb32a9b81006ef93b57b7671cb68d16 to your computer and use it in GitHub Desktop.
My attempt to shade guava with coursier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt.Keys._ | |
lazy val commonSettings = Seq( | |
name := "shading-issue", | |
version := "0.1", | |
scalaVersion in ThisBuild := "2.11.8" | |
) | |
lazy val `dummy` = (project in file(".")) | |
.settings(commonSettings: _*) | |
.aggregate(`dummy-api`, `dummy-impl`) | |
.enablePlugins(coursier.ShadingPlugin) | |
.settings( | |
coursier.ShadingPlugin.projectSettings, | |
shadeNamespaces ++= Set( | |
"google.shade" | |
), | |
libraryDependencies ++= Seq( | |
Dependencies.guava % "shaded", | |
Dependencies.hadoopMiniDFSCluster % Test % "shaded", | |
Dependencies.hadoopCommon % Test % "shaded" | |
) | |
) | |
lazy val `dummy-api` = (project in file("dummy-api")) | |
.settings( | |
libraryDependencies ++= Dependencies.`dummy-api` | |
) | |
lazy val `dummy-impl` = (project in file("dummy-impl")) | |
.enablePlugins(LagomScala) | |
.settings( | |
libraryDependencies ++= Dependencies.`dummy-impl` | |
) | |
.settings(lagomForkedTestSettings: _*) | |
.enablePlugins(coursier.ShadingPlugin) | |
.settings( | |
coursier.ShadingPlugin.projectSettings, | |
shadeNamespaces ++= Set( | |
"google.shade" | |
), | |
libraryDependencies ++= Seq( | |
Dependencies.guava % "shaded", | |
Dependencies.hadoopMiniDFSCluster % Test % "shaded", | |
Dependencies.hadoopCommon % Test % "shaded" | |
) | |
) | |
.dependsOn(`dummy-api`) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addSbtPlugin("com.lightbend.lagom" % "lagom-sbt-plugin" % "1.4.0-M3") | |
addSbtPlugin("io.get-coursier" % "sbt-shading" % "1.0.0") | |
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0") | |
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3") | |
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.8.0") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment