2019-06-30 12:23:04 +01:00
|
|
|
inThisBuild(List(
|
2019-06-30 19:00:10 +01:00
|
|
|
organization := "net.kemitix.thorp",
|
2019-06-30 12:23:04 +01:00
|
|
|
homepage := Some(url("https://github.com/kemitix/thorp")),
|
|
|
|
licenses := List("mit" -> url("https://opensource.org/licenses/MIT")),
|
|
|
|
developers := List(
|
|
|
|
Developer(
|
|
|
|
"kemitix",
|
|
|
|
"Paul Campbell",
|
|
|
|
"pcampbell@kemitix.net",
|
|
|
|
url("https://github.kemitix.net")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
))
|
|
|
|
|
|
|
|
val commonSettings = Seq(
|
2019-07-03 13:50:28 +01:00
|
|
|
sonatypeProfileName := "net.kemitix",
|
2019-06-11 23:36:08 +01:00
|
|
|
scalaVersion := "2.12.8",
|
|
|
|
test in assembly := {}
|
|
|
|
)
|
|
|
|
|
2019-06-06 19:24:15 +01:00
|
|
|
val applicationSettings = Seq(
|
2019-06-17 15:33:49 +01:00
|
|
|
name := "thorp",
|
2019-06-06 19:24:15 +01:00
|
|
|
)
|
|
|
|
val testDependencies = Seq(
|
|
|
|
libraryDependencies ++= Seq(
|
2019-06-11 07:36:58 +01:00
|
|
|
"org.scalatest" %% "scalatest" % "3.0.8" % Test,
|
2019-06-26 22:13:34 +01:00
|
|
|
"org.scalamock" %% "scalamock" % "4.3.0" % Test
|
2019-06-06 19:24:15 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
val commandLineParsing = Seq(
|
|
|
|
libraryDependencies ++= Seq(
|
|
|
|
"com.github.scopt" %% "scopt" % "4.0.0-RC2"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
val awsSdkDependencies = Seq(
|
|
|
|
libraryDependencies ++= Seq(
|
2019-06-26 22:14:15 +01:00
|
|
|
"com.amazonaws" % "aws-java-sdk-s3" % "1.11.580",
|
2019-06-07 21:17:14 +01:00
|
|
|
// override the versions AWS uses, which is they do to preserve Java 6 compatibility
|
|
|
|
"com.fasterxml.jackson.core" % "jackson-databind" % "2.9.9",
|
|
|
|
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor" % "2.9.9"
|
2019-06-06 19:24:15 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
val catsEffectsSettings = Seq(
|
|
|
|
libraryDependencies ++= Seq(
|
2019-06-07 21:03:45 +01:00
|
|
|
"org.typelevel" %% "cats-effect" % "1.3.1"
|
2019-06-06 19:24:15 +01:00
|
|
|
),
|
|
|
|
// recommended for cats-effects
|
|
|
|
scalacOptions ++= Seq(
|
|
|
|
"-feature",
|
|
|
|
"-deprecation",
|
|
|
|
"-unchecked",
|
|
|
|
"-language:postfixOps",
|
|
|
|
"-language:higherKinds",
|
|
|
|
"-Ypartial-unification")
|
|
|
|
)
|
2019-04-29 20:05:41 +01:00
|
|
|
|
2019-06-22 07:20:59 +01:00
|
|
|
// cli -> thorp-lib -> storage-aws -> core -> storage-api -> domain
|
2019-04-29 20:05:41 +01:00
|
|
|
|
2019-06-22 07:20:59 +01:00
|
|
|
lazy val thorp = (project in file("."))
|
2019-06-20 17:18:46 +01:00
|
|
|
.settings(commonSettings)
|
2019-06-25 08:27:38 +01:00
|
|
|
.aggregate(cli, `thorp-lib`, `storage-aws`, core, `storage-api`, domain)
|
2019-06-20 17:18:46 +01:00
|
|
|
|
2019-06-30 15:04:23 +01:00
|
|
|
import sbtassembly.AssemblyPlugin.defaultShellScript
|
2019-06-06 19:24:15 +01:00
|
|
|
lazy val cli = (project in file("cli"))
|
2019-06-11 23:36:08 +01:00
|
|
|
.settings(commonSettings)
|
2019-06-17 15:33:49 +01:00
|
|
|
.settings(mainClass in assembly := Some("net.kemitix.thorp.cli.Main"))
|
2019-06-06 19:24:15 +01:00
|
|
|
.settings(applicationSettings)
|
|
|
|
.settings(commandLineParsing)
|
2019-06-14 19:01:46 +01:00
|
|
|
.settings(testDependencies)
|
2019-06-30 15:04:23 +01:00
|
|
|
.settings(Seq(
|
|
|
|
assemblyOption in assembly := (
|
|
|
|
assemblyOption in assembly).value
|
|
|
|
.copy(prependShellScript =
|
|
|
|
Some(defaultShellScript)),
|
|
|
|
assemblyJarName in assembly := "thorp"
|
|
|
|
))
|
2019-06-17 16:47:01 +01:00
|
|
|
.dependsOn(`thorp-lib`)
|
|
|
|
|
|
|
|
lazy val `thorp-lib` = (project in file("thorp-lib"))
|
|
|
|
.settings(commonSettings)
|
|
|
|
.settings(assemblyJarName in assembly := "thorp-lib.jar")
|
2019-06-22 07:20:59 +01:00
|
|
|
.dependsOn(`storage-aws`)
|
2019-04-29 20:19:04 +01:00
|
|
|
|
2019-06-22 07:20:59 +01:00
|
|
|
lazy val `storage-aws` = (project in file("storage-aws"))
|
2019-06-11 23:36:08 +01:00
|
|
|
.settings(commonSettings)
|
2019-06-22 07:20:59 +01:00
|
|
|
.settings(assemblyJarName in assembly := "storage-aws.jar")
|
2019-06-06 19:24:15 +01:00
|
|
|
.settings(awsSdkDependencies)
|
|
|
|
.settings(testDependencies)
|
2019-06-25 08:27:38 +01:00
|
|
|
.dependsOn(core % "compile->compile;test->test")
|
2019-04-29 20:19:21 +01:00
|
|
|
|
2019-06-06 19:24:15 +01:00
|
|
|
lazy val core = (project in file("core"))
|
2019-06-11 23:36:08 +01:00
|
|
|
.settings(commonSettings)
|
|
|
|
.settings(assemblyJarName in assembly := "core.jar")
|
2019-06-06 19:24:15 +01:00
|
|
|
.settings(testDependencies)
|
2019-06-22 07:20:59 +01:00
|
|
|
.dependsOn(`storage-api`)
|
2019-06-29 19:07:51 +01:00
|
|
|
.dependsOn(domain % "compile->compile;test->test")
|
2019-05-07 08:24:56 +01:00
|
|
|
|
2019-06-22 07:20:59 +01:00
|
|
|
lazy val `storage-api` = (project in file("storage-api"))
|
2019-06-11 23:36:08 +01:00
|
|
|
.settings(commonSettings)
|
2019-06-22 07:20:59 +01:00
|
|
|
.settings(assemblyJarName in assembly := "storage-api.jar")
|
2019-06-06 19:24:15 +01:00
|
|
|
.dependsOn(domain)
|
2019-05-05 19:28:52 +01:00
|
|
|
|
2019-06-06 19:24:15 +01:00
|
|
|
lazy val domain = (project in file("domain"))
|
2019-06-11 23:36:08 +01:00
|
|
|
.settings(commonSettings)
|
|
|
|
.settings(assemblyJarName in assembly := "domain.jar")
|
2019-06-20 17:18:46 +01:00
|
|
|
.settings(catsEffectsSettings)
|
2019-06-06 19:24:15 +01:00
|
|
|
.settings(testDependencies)
|