-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.sbt
139 lines (127 loc) · 5.54 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
publish / skip := true
val scala212V = "2.12.20"
val scala213V = "2.13.15"
val scala3V = "3.5.1"
val scalaV = scala213V
val pekkoV = "1.1.2"
val MongoJavaDriverVersion = "5.2.0"
val NettyVersion = "4.1.114.Final"
val Log4jVersion = "2.24.1"
val commonDeps = Seq(
("org.apache.pekko" %% "pekko-persistence" % pekkoV)
.exclude("org.iq80.leveldb", "leveldb")
.exclude("org.fusesource.leveldbjni", "leveldbjni-all"),
"nl.grons" %% "metrics4-scala" % "4.3.3",
"org.apache.pekko" %% "pekko-persistence-query" % pekkoV % "compile",
"org.apache.pekko" %% "pekko-persistence" % pekkoV % "compile",
"org.apache.pekko" %% "pekko-actor" % pekkoV % "compile",
"org.mongodb" % "mongodb-driver-core" % MongoJavaDriverVersion % "compile",
"org.mongodb" % "mongodb-driver-legacy" % MongoJavaDriverVersion % "test",
"org.slf4j" % "slf4j-api" % "2.0.16" % "test",
"org.apache.logging.log4j" % "log4j-api" % Log4jVersion % "test",
"org.apache.logging.log4j" % "log4j-core" % Log4jVersion % "test",
"org.apache.logging.log4j" % "log4j-slf4j-impl" % Log4jVersion % "test",
"org.scalatest" %% "scalatest" % "3.2.19" % "test",
"org.scalatestplus" %% "mockito-5-10" % "3.2.18.0" % "test",
"org.scalatestplus" %% "junit-4-13" % "3.2.19.0" % "test",
"junit" % "junit" % "4.13.2" % "test",
"org.mockito" % "mockito-core" % "5.14.2" % "test",
"org.apache.pekko" %% "pekko-slf4j" % pekkoV % "test",
"org.apache.pekko" %% "pekko-testkit" % pekkoV % "test",
"org.apache.pekko" %% "pekko-persistence-tck" % pekkoV % "test",
"org.apache.pekko" %% "pekko-cluster-sharding" % pekkoV % "test"
)
lazy val Ci = config("ci").extend(Test)
ThisBuild / organization := "com.github.scullxbones"
ThisBuild / scalaVersion := scalaV
ThisBuild / versionScheme := Some("semver-spec")
import xerial.sbt.Sonatype._
ThisBuild / sonatypeProjectHosting := Some(GitHubHosting("scullxbones", "pekko-persistence-mongo", "[email protected]"))
ThisBuild / licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
ThisBuild / developers := List(
Developer(
"scullxbones",
"Brian Scully",
"@scullxbones",
url("https://github.com/scullxbones/")
),
Developer(
"thjaeckle",
"Thomas Jäckle",
"@thjaeckle",
url("https://github.com/thjaeckle/")
)
)
ThisBuild / homepage := Some(url("https://github.com/scullxbones/pekko-persistence-mongo"))
val commonSettings = Seq(
scalaVersion := scalaV,
crossScalaVersions := Seq(scala212V, scala213V, scala3V),
libraryDependencies ++= commonDeps,
dependencyOverrides ++= Seq(
"com.typesafe" % "config" % "1.4.3",
"org.slf4j" % "slf4j-api" % "2.0.16",
"org.apache.pekko" %% "pekko-stream" % pekkoV,
"org.mongodb" % "mongodb-driver-legacy" % MongoJavaDriverVersion
),
libraryDependencySchemes += "org.scala-lang.modules" %% "scala-java8-compat" % VersionScheme.Always,
organization := "com.github.scullxbones",
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-encoding", "UTF-8", // yes, this is 2 args
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
// "-Xfatal-warnings", Deprecations keep from enabling this
"-Xlint",
"-Ywarn-dead-code", // N.B. doesn't work well with the ??? hole
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xfuture",
"-target:jvm-1.8"
),
javacOptions ++= Seq(
"-source", "1.8",
"-target", "1.8",
"-Xlint"
),
resolvers ++= Seq(
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
),
Test / parallelExecution := false,
Test / testOptions += Tests.Argument("-oDS"),
Ci / testOptions += Tests.Argument("-l", "org.scalatest.tags.Slow"),
Test / fork := false,
) ++ inConfig(Ci)(Defaults.testTasks)
lazy val `pekko-persistence-mongodb` = (project in file("scala"))
.settings(commonSettings:_*)
.settings(
libraryDependencies ++= Seq(
"org.mongodb.scala" %% "mongo-scala-driver" % MongoJavaDriverVersion % "compile" cross CrossVersion.for3Use2_13,
"org.mongodb.scala" %% "mongo-scala-bson" % MongoJavaDriverVersion % "compile" cross CrossVersion.for3Use2_13,
"io.netty" % "netty-buffer" % NettyVersion % "compile",
"io.netty" % "netty-transport" % NettyVersion % "compile",
"io.netty" % "netty-handler" % NettyVersion % "compile",
"org.reactivestreams" % "reactive-streams" % "1.0.4"
),
dependencyOverrides ++= Seq(
)
)
.configs(Ci)
lazy val `pekko-persistence-mongo-tools` = (project in file("tools"))
.dependsOn(`pekko-persistence-mongodb` % "test->test;compile->compile")
.settings(commonSettings:_*)
.settings(
libraryDependencies ++= Seq(
"org.mongodb.scala" %% "mongo-scala-driver" % MongoJavaDriverVersion % "compile" cross CrossVersion.for3Use2_13
),
publish / skip := true
)
.configs(Ci)
lazy val `pekko-persistence-mongo` = (project in file("."))
.aggregate(`pekko-persistence-mongodb`, `pekko-persistence-mongo-tools`)
.settings(
crossScalaVersions := Nil,
publish / skip := true
)