Skip to content

Commit

Permalink
Use shaded sbt build bloop plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jvican committed Aug 30, 2019
1 parent 526e356 commit af112ab
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,12 @@ addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.14")
// Enable this for the bloop build to work
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.1")

val typesafeConfig = "com.typesafe" % "config" % "1.3.2"
val metaconfigCore = "com.geirsson" %% "metaconfig-core" % "0.6.0"
val metaconfigConfig = "com.geirsson" %% "metaconfig-typesafe-config" % "0.6.0"
val metaconfigDocs = "com.geirsson" %% "metaconfig-docs" % "0.6.0"
val circeDerivation = "io.circe" %% "circe-derivation" % "0.9.0-M3"
// required for java9+
val javaxActivation = "com.sun.activation" % "javax.activation" % "1.2.0"

// Let's add our sbt plugin to the sbt too ;)
unmanagedSourceDirectories in Compile ++= {
val baseDir = baseDirectory.value.getParentFile.getParentFile
val integrationsMainDir = baseDir / "integrations"
if (!integrationsMainDir.exists()) Nil
else {
val pluginMainDir = integrationsMainDir / "sbt-bloop" / "src" / "main"
List(
baseDir / "config" / "src" / "main" / "scala",
baseDir / "config" / "src" / "main" / "scala-2.11-12",
pluginMainDir / "scala",
pluginMainDir / s"scala-sbt-${Keys.sbtBinaryVersion.value}"
)
}
}
addSbtPlugin("ch.epfl.scala" % "sbt-bloop-build-shaded" % "1.0.0-SNAPSHOT")
updateOptions := updateOptions.value.withLatestSnapshots(false)

libraryDependencies ++= List(
typesafeConfig,
metaconfigCore,
metaconfigDocs,
metaconfigConfig,
circeDerivation,
javaxActivation
)

0 comments on commit af112ab

Please sign in to comment.