This repository has been archived by the owner on Sep 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
99 lines (80 loc) · 3.59 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
import sbt.Keys._
import sbt._
import sbtassembly.AssemblyPlugin.autoImport._
import sbtassembly.AssemblyPlugin.defaultShellScript
import scalariform.formatter.preferences._
lazy val akka =
Seq(libraryDependencies ++= Seq("com.typesafe.akka" %% "akka-actor" % "2.8.6",
"com.typesafe.akka" %% "akka-actor-typed" % "2.8.6",
"com.typesafe.akka" %% "akka-slf4j" % "2.8.6",
"com.typesafe.akka" %% "akka-stream" % "2.8.6",
"com.typesafe.akka" %% "akka-stream-typed" % "2.8.6",
"com.typesafe.akka" %% "akka-http-core" % "10.5.3",
"com.typesafe.akka" %% "akka-stream-testkit" % "2.8.6" % "test",
"com.iheart" %% "ficus" % "1.5.2",
"ch.qos.logback" % "logback-classic" % "1.5.8"))
lazy val assemble =
Seq(assembly / assemblyJarName := name.value,
assembly / target := new File("bin/"),
assembly / assemblyCacheOutput := false,
assembly / assemblyPrependShellScript := Some(defaultShellScript :+ ""),
assembly / assemblyMergeStrategy := {
case "module-info.class" => MergeStrategy.discard
case PathList("META-INF", _*) => MergeStrategy.discard
case PathList(ps @ _*) if ps.last.endsWith(".proto") => MergeStrategy.first
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
},
assembly / test := {})
lazy val scopt = Seq(libraryDependencies += "com.github.scopt" %% "scopt" % "4.1.0")
lazy val specs2 = Seq(libraryDependencies += "org.specs2" %% "specs2-core" % "4.20.8" % "test",
Test / fork := true)
lazy val csv = Seq(libraryDependencies += "com.github.tototoshi" %% "scala-csv" % "1.4.1")
lazy val mysql =
Seq(libraryDependencies ++= Seq("org.apache.commons" % "commons-dbcp2" % "2.12.0",
"commons-dbutils" % "commons-dbutils" % "1.8.1",
"com.mysql" % "mysql-connector-j" % "8.4.0"))
lazy val scalaz = Seq(libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.3.8")
lazy val common = Defaults.coreDefaultSettings ++ assemble ++
Seq(scalaVersion := "2.13.14",
scalariformAutoformat := true,
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature"),
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(AlignArguments, true)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentConstructorArguments, true)
.setPreference(SpacesWithinPatternBinders, false)
.setPreference(SpacesAroundMultiImports, false))
lazy val stk = project
.in(file("."))
.settings(name := "stk")
.aggregate(replicate, wipe, stats, loader, sms)
lazy val stats = project
.in(file("stats"))
.settings(name := "stats", common, akka, scopt)
.dependsOn(canape, steenwerck)
lazy val replicate = project
.in(file("replicate"))
.settings(name := "replicate", common, akka, scopt, specs2, csv, scalaz, Revolver.settings)
.dependsOn(canape, steenwerck, rxtelegram, octopush)
lazy val loader = project
.in(file("loader"))
.settings(name := "loader", common, akka, mysql, scopt, Revolver.settings)
.dependsOn(canape, steenwerck)
lazy val wipe = project
.in(file("wipe"))
.settings(name := "wipe", common, akka, scopt)
.dependsOn(canape, steenwerck)
lazy val sms = project
.in(file("sms"))
.settings(name := "sms", common, akka, scopt)
.dependsOn(octopush)
lazy val canape = RootProject(file("external/canape"))
lazy val octopush = RootProject(file("external/octopush-akka"))
lazy val steenwerck = project
.in(file("libs/steenwerck"))
.settings(name := "Steenwerck", common, akka)
.dependsOn(canape)
lazy val rxtelegram = RootProject(file("external/rxtelegram"))