forked from kurrent-io/EventStore.JVM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
108 lines (97 loc) · 4.03 KB
/
Copy pathbuild.sbt
File metadata and controls
108 lines (97 loc) · 4.03 KB
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
import sbtprotobuf.ProtobufPlugin
import com.github.os72.protocjar.Protoc
import Dependencies._
lazy val isScala3 = Def.setting[Boolean](scalaVersion.value.startsWith("3."))
lazy val commonSettings = Seq(
organization := "com.geteventstore",
scalaVersion := crossScalaVersions.value.head,
crossScalaVersions := Seq("3.1.0", "2.13.7", "2.12.18"),
releaseCrossBuild := true,
licenses := Seq("BSD 3-Clause" -> url("http://raw.github.com/EventStore/EventStore.JVM/master/LICENSE")),
homepage := Some(new URL("http://github.com/EventStore/EventStore.JVM")),
organizationHomepage := Some(new URL("http://geteventstore.com")),
description := "Event Store JVM Client",
startYear := Some(2013),
scalacOptions ++= { if (isScala3.value) Seq("-Xtarget:8") else Seq("-target:jvm-1.8") },
javacOptions ++= Seq("-target", "8", "-source", "8"),
Test / compile / scalacOptions --= Seq("-Ywarn-value-discard", "-Wvalue-discard"),
Compile / doc / scalacOptions ++= Seq("-groups", "-implicits", "-no-link-warnings"),
Compile / doc / scalacOptions --= Seq("-Xfatal-warnings"),
Global / pomExtra := {
<scm>
<url>git@github.com:EventStore/EventStore.JVM.git</url>
<connection>scm:git:git@github.com:EventStore/EventStore.JVM.git</connection>
<developerConnection>scm:git:git@github.com:EventStore/EventStore.JVM.git</developerConnection>
</scm>
<developers>
<developer>
<id>t3hnar</id>
<name>Yaroslav Klymko</name>
<email>t3hnar@gmail.com</email>
</developer>
<developer>
<id>ahjohannessen</id>
<name>Alex Henning Johannessen</name>
<email>ahjohannessen@gmail.com</email>
</developer>
</developers>
},
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishTo := sonatypePublishTo.value
)
///
lazy val IntegrationTest = config("it") extend Test
lazy val ClusterTest = config("c") extend Test
lazy val root = project.in(file("."))
.settings(commonSettings)
.settings(publish / skip := true)
.dependsOn(core, client, examples)
.aggregate(core, client, examples)
lazy val core = project
.settings(commonSettings)
.settings(
moduleName := "eventstore-client-core",
ProtobufConfig / version := protobufVersion,
ProtobufConfig / protobufRunProtoc := { args => Protoc.runProtoc(s"-v$protobufVersion" +: args.toArray) },
coverageExcludedPackages :=
"eventstore.proto;" +
"eventstore.tcp.EventStoreProtoFormats;" +
"eventstore.tcp.MarkerBytes;"
).settings(
libraryDependencies ++=
Seq(`scodec-bits`, `ts-config`) ++ testDeps(specs2.cross(CrossVersion.for3Use2_13))
)
.enablePlugins(ProtobufPlugin)
lazy val client = project
.configs(IntegrationTest, ClusterTest)
.settings(commonSettings)
.settings(inConfig(IntegrationTest)(Defaults.testTasks): _*)
.settings(inConfig(ClusterTest)(Defaults.testTasks): _*)
.settings(
moduleName := "eventstore-client",
Test / testOptions := Seq(Tests.Filter(_ endsWith "Spec")),
IntegrationTest / testOptions := Seq(Tests.Filter(_ endsWith "ITest")),
ClusterTest / testOptions := Seq(Tests.Filter(_ endsWith "CTest")),
IntegrationTest / parallelExecution := false,
ClusterTest / parallelExecution := false,
coverageExcludedPackages := "eventstore.j;"
)
.settings(
libraryDependencies ++= Seq(
`ts-config`, circe, `scodec-bits`,
Reactive.streams, Akka.actor, Akka.stream,
Sttp.sttpCore, Sttp.sttpOkHttp, Sttp.sttpCirce
) ++ testDeps(
specs2.cross(CrossVersion.for3Use2_13), circeParser, Reactive.`streams-tck`, Akka.testkit, Akka.`stream-testkit`
)
)
.dependsOn(core)
lazy val examples = project
.settings(commonSettings)
.settings(
moduleName := "eventstore-client-examples",
scalacOptions --= Seq("-Ywarn-value-discard", "-Wvalue-discard"),
publish / skip := true,
coverageExcludedPackages := "eventstore.examples;eventstore.j;"
)
.dependsOn(client)