Created
November 23, 2018 16:32
-
-
Save samuelorji/8b74d7f1879611ed3c2669bfb06c6bb6 to your computer and use it in GitHub Desktop.
A sample build.sbt file ffor multiple projects
This file contains hidden or 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
val Snapshots = "Snapshots" at "url to repo " | |
val Releases = "Releases" at "url to repo " | |
lazy val sharedSettings = Seq( | |
scalaVersion := "2.12.6", | |
version := "0.1.6", | |
resolvers ++= Seq( | |
Snapshots, | |
Releases, | |
"Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/", | |
"Confluent Maven Repository" at "http://packages.confluent.io/maven/" | |
), | |
scalacOptions ++= Seq( | |
"-deprecation", | |
"-feature", | |
"-unchecked" | |
), | |
updateOptions := updateOptions.value.withLatestSnapshots(false), | |
test in assembly := {}, | |
assemblyMergeStrategy in assembly := { | |
case "META-INF/io.netty.versions.properties" => MergeStrategy.first | |
case PathList("io", "netty", xs @ _*) => MergeStrategy.last | |
case "logback.xml" => MergeStrategy.last | |
case x => | |
val oldStrategy = (assemblyMergeStrategy in assembly).value | |
oldStrategy(x) | |
} | |
) | |
val akkaVersion = "2.5.17" | |
val akkaHttpVersion = "10.1.5" | |
val scalaTestVersion = "3.0.5" | |
lazy val elmer = (project in file(".")) | |
.aggregate(core, web) | |
lazy val sharedDependencies = Seq( | |
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test, | |
"org.scalatest" %% "scalatest" % scalaTestVersion % Test | |
) | |
lazy val core = (project in file("core")). | |
settings( | |
sharedSettings, | |
libraryDependencies ++= sharedDependencies, | |
libraryDependencies ++= Seq( | |
"com.typesafe.akka" %% "akka-actor" % akkaVersion, | |
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion, | |
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion, | |
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion | |
) | |
) | |
lazy val web = (project in file("web")). | |
settings( | |
sharedSettings, | |
libraryDependencies ++= sharedDependencies | |
).dependsOn(core) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment