-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.sbt
116 lines (106 loc) · 4.69 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import xerial.sbt.Sonatype.GitHubHosting
import org.typelevel.scalacoptions.ScalacOptions
val mainScala = "2.13.15"
val allScala = Seq(mainScala, "3.3.3")
val excludeInferAny = { options: Seq[String] => options.filterNot(Set("-Xlint:infer-any")) }
inThisBuild(
List(
organization := "nl.vroste",
homepage := Some(url("https://github.com/svroonland/zio-kinesis")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
scalaVersion := mainScala,
crossScalaVersions := allScala,
compileOrder := CompileOrder.JavaThenScala,
Test / parallelExecution := false,
Global / cancelable := true,
Test / fork := true,
Test / fork := true,
assembly / assemblyMergeStrategy := {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case n if n.startsWith("reference.conf") => MergeStrategy.concat
case _ => MergeStrategy.first
},
scmInfo := Some(
ScmInfo(url("https://github.com/svroonland/zio-kinesis/"), "scm:git:[email protected]:svroonland/zio-kinesis.git")
),
sonatypeProjectHosting := Some(
GitHubHosting("svroonland", "zio-kinesis", "[email protected]")
),
developers := List(
Developer(
"svroonland",
"Vroste",
url("https://github.com/svroonland")
)
),
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
// Workaround for "/Users/steven/projects/personal/zio/zio-kinesis/core/src/main/scala/nl/vroste/zio/kinesis/client/zionative/Consumer.scala:317:17: pattern var shardStream in value $anonfun is never used"
tpolecatExcludeOptions += ScalacOptions.warnUnusedPatVars
)
)
val zioVersion = "2.1.11"
val zioAwsVersion = "7.28.29.5"
lazy val root = project
.in(file("."))
.settings(
Seq(
scalafmtOnCompile := false
)
)
.settings(stdSettings: _*)
.aggregate(core, interopFutures, dynamicConsumer)
.dependsOn(core, interopFutures, dynamicConsumer)
lazy val core = (project in file("core"))
.enablePlugins(ProtobufPlugin)
.settings(stdSettings: _*)
.settings(
Seq(
name := "zio-kinesis"
)
)
lazy val stdSettings: Seq[sbt.Def.SettingsDefinition] = Seq(
Compile / compile / javacOptions ++= Seq("--release", "8"),
Compile / scalacOptions ~= excludeInferAny,
// Suppresses problems with Scaladoc @throws links
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-streams" % zioVersion,
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test",
"dev.zio" %% "zio-interop-reactivestreams" % "2.0.2",
"dev.zio" %% "zio-logging" % "2.4.0",
"dev.zio" %% "zio-logging-slf4j" % "2.4.0",
"ch.qos.logback" % "logback-classic" % "1.5.12",
"org.hdrhistogram" % "HdrHistogram" % "2.2.2",
"dev.zio" %% "zio-aws-core" % zioAwsVersion,
"dev.zio" %% "zio-aws-kinesis" % zioAwsVersion,
"dev.zio" %% "zio-aws-dynamodb" % zioAwsVersion,
"dev.zio" %% "zio-aws-cloudwatch" % zioAwsVersion,
"dev.zio" %% "zio-aws-netty" % zioAwsVersion,
"javax.xml.bind" % "jaxb-api" % "2.3.1"
)
)
addCommandAlias("fmt", "all scalafmtSbt scalafmt test:scalafmt")
addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck")
lazy val interopFutures = (project in file("interop-futures"))
.settings(stdSettings: _*)
.settings(
name := "zio-kinesis-future",
assembly / assemblyJarName := "zio-kinesis-future" + version.value + ".jar",
libraryDependencies ++= Seq(
"dev.zio" %% "zio-interop-reactivestreams" % "1.3.4"
)
)
.dependsOn(core)
lazy val dynamicConsumer = (project in file("dynamic-consumer"))
.settings(stdSettings: _*)
.settings(
name := "zio-kinesis-dynamic-consumer",
assembly / assemblyJarName := "zio-kinesis-dynamic-consumer" + version.value + ".jar",
libraryDependencies ++= Seq(
"software.amazon.kinesis" % "amazon-kinesis-client" % "3.0.1"
)
)
.dependsOn(core % "compile->compile;test->test")