2019-07-16 07:56:54 +01:00
|
|
|
import sbtassembly.AssemblyPlugin.defaultShellScript
|
|
|
|
|
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-09-01 21:30:16 +01:00
|
|
|
scalaVersion := "2.13.0",
|
2019-07-16 07:56:54 +01:00
|
|
|
scalacOptions ++= Seq(
|
2019-09-01 21:30:16 +01:00
|
|
|
"-Ywarn-unused:imports",
|
2019-07-16 07:56:54 +01:00
|
|
|
"-Xfatal-warnings",
|
|
|
|
"-feature",
|
|
|
|
"-deprecation",
|
|
|
|
"-unchecked",
|
|
|
|
"-language:postfixOps",
|
2019-09-01 21:30:16 +01:00
|
|
|
"-language:higherKinds"),
|
|
|
|
wartremoverErrors ++= Warts.unsafe.filterNot(wart => List(
|
|
|
|
Wart.Any,
|
|
|
|
Wart.Nothing,
|
|
|
|
Wart.Serializable,
|
|
|
|
Wart.NonUnitStatements,
|
|
|
|
Wart.StringPlusAny
|
|
|
|
).contains(wart)),
|
2019-06-11 23:36:08 +01:00
|
|
|
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-08-17 18:27:22 +01:00
|
|
|
"org.scalamock" %% "scalamock" % "4.4.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-08-14 07:00:52 +01:00
|
|
|
"com.amazonaws" % "aws-java-sdk-s3" % "1.11.610",
|
2019-06-07 21:17:14 +01:00
|
|
|
// override the versions AWS uses, which is they do to preserve Java 6 compatibility
|
2019-08-06 17:34:55 +01:00
|
|
|
"com.fasterxml.jackson.core" % "jackson-databind" % "2.9.9.3",
|
2019-08-04 20:13:04 +01:00
|
|
|
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor" % "2.9.9",
|
|
|
|
"javax.xml.bind" % "jaxb-api" % "2.3.1"
|
2019-06-06 19:24:15 +01:00
|
|
|
)
|
|
|
|
)
|
2019-07-21 21:02:04 +01:00
|
|
|
val zioDependencies = Seq(
|
|
|
|
libraryDependencies ++= Seq (
|
2019-09-07 07:52:13 +01:00
|
|
|
"dev.zio" %% "zio" % "1.0.0-RC12-1",
|
|
|
|
"dev.zio" %% "zio-streams" % "1.0.0-RC12-1"
|
2019-07-16 07:56:54 +01:00
|
|
|
)
|
2019-06-06 19:24:15 +01:00
|
|
|
)
|
2019-04-29 20:05:41 +01:00
|
|
|
|
2019-09-07 07:52:13 +01:00
|
|
|
val eipDependencies = Seq(
|
|
|
|
libraryDependencies ++= Seq(
|
|
|
|
"net.kemitix" %% "eip-zio" % "0.3.1"
|
|
|
|
)
|
|
|
|
)
|
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-09-07 07:52:13 +01:00
|
|
|
.aggregate(app, cli, `storage-aws`, lib, `storage`, domain)
|
2019-06-20 17:18:46 +01:00
|
|
|
|
2019-09-07 07:52:13 +01:00
|
|
|
lazy val app = (project in file("app"))
|
2019-06-11 23:36:08 +01:00
|
|
|
.settings(commonSettings)
|
2019-09-07 07:52:13 +01:00
|
|
|
.settings(mainClass in assembly := Some("net.kemitix.thorp.Main"))
|
2019-06-06 19:24:15 +01:00
|
|
|
.settings(applicationSettings)
|
2019-09-07 07:52:13 +01:00
|
|
|
.settings(eipDependencies)
|
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-09-07 07:52:13 +01:00
|
|
|
.dependsOn(cli)
|
|
|
|
.dependsOn(lib)
|
|
|
|
.dependsOn(`storage-aws`)
|
2019-06-17 16:47:01 +01:00
|
|
|
|
2019-09-07 07:52:13 +01:00
|
|
|
lazy val cli = (project in file("cli"))
|
2019-06-17 16:47:01 +01:00
|
|
|
.settings(commonSettings)
|
2019-09-07 07:52:13 +01:00
|
|
|
.settings(testDependencies)
|
|
|
|
.dependsOn(config)
|
|
|
|
.dependsOn(filesystem % "test->test")
|
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-09-07 07:52:13 +01:00
|
|
|
.dependsOn(storage)
|
|
|
|
.dependsOn(filesystem % "compile->compile;test->test")
|
|
|
|
.dependsOn(console)
|
|
|
|
.dependsOn(lib)
|
2019-04-29 20:19:21 +01:00
|
|
|
|
2019-09-07 07:52:13 +01:00
|
|
|
lazy val lib = (project in file("lib"))
|
2019-06-11 23:36:08 +01:00
|
|
|
.settings(commonSettings)
|
2019-09-07 07:52:13 +01:00
|
|
|
.settings(assemblyJarName in assembly := "lib.jar")
|
2019-06-06 19:24:15 +01:00
|
|
|
.settings(testDependencies)
|
2019-09-07 07:52:13 +01:00
|
|
|
.enablePlugins(BuildInfoPlugin)
|
|
|
|
.settings(
|
|
|
|
buildInfoKeys := Seq[BuildInfoKey](name, version),
|
|
|
|
buildInfoPackage := "thorp"
|
|
|
|
)
|
|
|
|
.dependsOn(storage)
|
|
|
|
.dependsOn(console)
|
|
|
|
.dependsOn(config)
|
2019-06-29 19:07:51 +01:00
|
|
|
.dependsOn(domain % "compile->compile;test->test")
|
2019-09-07 07:52:13 +01:00
|
|
|
.dependsOn(filesystem % "compile->compile;test->test")
|
2019-05-07 08:24:56 +01:00
|
|
|
|
2019-09-07 07:52:13 +01:00
|
|
|
lazy val storage = (project in file("storage"))
|
2019-06-11 23:36:08 +01:00
|
|
|
.settings(commonSettings)
|
2019-07-21 21:02:04 +01:00
|
|
|
.settings(zioDependencies)
|
2019-09-07 07:52:13 +01:00
|
|
|
.settings(assemblyJarName in assembly := "storage.jar")
|
|
|
|
.dependsOn(uishell)
|
|
|
|
.dependsOn(domain)
|
|
|
|
|
|
|
|
lazy val uishell = (project in file("uishell"))
|
|
|
|
.settings(commonSettings)
|
|
|
|
.settings(zioDependencies)
|
|
|
|
.settings(eipDependencies)
|
|
|
|
.settings(assemblyJarName in assembly := "uishell.jar")
|
2019-07-30 10:33:06 +01:00
|
|
|
.dependsOn(config)
|
2019-09-07 07:52:13 +01:00
|
|
|
.dependsOn(console)
|
|
|
|
.dependsOn(filesystem)
|
2019-07-23 23:13:09 +01:00
|
|
|
|
|
|
|
lazy val console = (project in file("console"))
|
|
|
|
.settings(commonSettings)
|
|
|
|
.settings(zioDependencies)
|
|
|
|
.settings(assemblyJarName in assembly := "console.jar")
|
2019-09-07 07:52:13 +01:00
|
|
|
.dependsOn(domain)
|
2019-05-05 19:28:52 +01:00
|
|
|
|
2019-07-28 21:47:01 +01:00
|
|
|
lazy val config = (project in file("config"))
|
|
|
|
.settings(commonSettings)
|
|
|
|
.settings(zioDependencies)
|
|
|
|
.settings(testDependencies)
|
|
|
|
.settings(commandLineParsing)
|
|
|
|
.settings(assemblyJarName in assembly := "config.jar")
|
2019-08-01 08:34:58 +01:00
|
|
|
.dependsOn(domain % "compile->compile;test->test")
|
2019-07-30 08:07:26 +01:00
|
|
|
.dependsOn(filesystem)
|
|
|
|
|
|
|
|
lazy val filesystem = (project in file("filesystem"))
|
|
|
|
.settings(commonSettings)
|
|
|
|
.settings(zioDependencies)
|
|
|
|
.settings(testDependencies)
|
|
|
|
.settings(assemblyJarName in assembly := "filesystem.jar")
|
2019-09-07 07:52:13 +01:00
|
|
|
.dependsOn(domain % "compile->compile;test->test")
|
2019-07-28 21:47:01 +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-06 19:24:15 +01:00
|
|
|
.settings(testDependencies)
|
2019-08-05 08:38:44 +01:00
|
|
|
.settings(zioDependencies)
|