-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
72 lines (52 loc) · 2.15 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
name := "kafka-streams-scala-template"
version := "0.1"
organization := "com.example"
scalaVersion := "2.13.8"
// Always fork the jvm (test and run)
fork := true
// Allow CTRL-C to cancel running tasks without exiting SBT CLI.
Global / cancelable := true
val json4SVer = "3.6.12"
val scalatestVer = "3.2.12"
// Note 2.8.1 and 3.X require mods to mockedstreams.
// See https://github.com/invadergir/mockedstreams-fork-kafka3.2-support
val kafkaVer = "2.7.2"
//val kafkaVer = "2.8.1"
//val kafkaVer = "3.2.0"
val mockedstreamsVer = "3.9.0" // compat with kafka 2.7.0
libraryDependencies ++= Seq(
// Kafka streams
"org.apache.kafka" % "kafka-clients" % kafkaVer,
"org.apache.kafka" %% "kafka-streams-scala" % kafkaVer,
// this is included in kafka-streams-scala:
//"org.apache.kafka" % "kafka-streams" % kafkaVer,
// For JSON parsing (see https://github.com/json4s/json4s)
"org.json4s" %% "json4s-jackson" % json4SVer,
"org.json4s" %% "json4s-ext" % json4SVer,
// config
"com.github.pureconfig" %% "pureconfig" % "0.17.1",
// logging
"ch.qos.logback" % "logback-classic" % "1.2.10",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
// For testing:
"org.scalatest" %% "scalatest" % scalatestVer % Test,
"org.scalactic" %% "scalactic" % scalatestVer % Test,
"com.madewithtea" %% "mockedstreams" % mockedstreamsVer % Test,
)
// Print full stack traces in tests:
Test / testOptions += Tests.Argument("-oF")
// Assembly stuff (for fat jar)
assembly / mainClass := Some("com.example.kafkastreamsscalatemplate.Main")
assembly / assemblyJarName := "kafka-streams-scala-template.jar"
// Fix duplicate jackson issue with module-info.class. Just discard them.
// See: https://github.com/sbt/sbt-assembly/issues/391
assembly / assemblyMergeStrategy := {
case PathList("module-info.class") => MergeStrategy.discard
//case PathList("META-INF", "versions", xs @ _, "module-info.class") => MergeStrategy.discard
case x => (ThisBuild / assemblyMergeStrategy).value(x)
}
// Some stuff to import in the console
console / initialCommands := """
// project stuff
import com.example.kafkastreamsscalatemplate._
"""