-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
123 lines (114 loc) · 3.52 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
ThisBuild / organization := "ru.delimobil"
ThisBuild / scalaVersion := "2.13.13"
ThisBuild / crossScalaVersions ++= Seq("2.12.19", "3.2.2")
val kindProjectorVersion = "0.13.3"
val catsVersion = "2.6.1"
val fs2VersionCE2 = "2.5.11"
val fs2VersionCE3 = "3.10.0"
val circeVersion = "0.14.1"
val amqpClientVersion = "5.13.1"
val pureconfigVersion = "0.17.1"
val scalatestVersion = "3.2.11"
val testContainersVersion = "0.40.2"
val slf4jVersion = "1.7.36"
val libVersion = "0.2.0-RC4"
val publishSettings = Seq(
version := libVersion,
// sonatype config
publishTo := sonatypePublishToBundle.value,
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://github.com/delimobil/cabbit")),
scmInfo := Some(
ScmInfo(url("https://github.com/delimobil/cabbit"), "scm:[email protected]/delimobil/cabbit.git")
),
developers := List(
Developer(
id = "nikiforo",
name = "Artem Nikiforov",
email = "[email protected]",
url = url("https://github.com/nikiforo")
)
)
)
val commonSettings = Seq(
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Seq("-source:3.0-migration", "-Ykind-projector:underscores")
case Some((2, 13)) =>
Seq("-deprecation", "-Xfatal-warnings")
case Some((2, 12)) =>
Seq("-Ypartial-unification")
case _ =>
Seq()
}
},
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) =>
Seq(
compilerPlugin(
("org.typelevel" %% "kind-projector" % kindProjectorVersion).cross(CrossVersion.full)
)
)
case _ =>
Seq()
}
}
)
val core = (project in file("core"))
.settings(commonSettings)
.settings(publishSettings)
.settings(
name := "cabbit-core",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % catsVersion,
"com.rabbitmq" % "amqp-client" % amqpClientVersion
)
)
val root = (project in file("."))
.dependsOn(core)
.settings(commonSettings)
.settings(publishSettings)
.settings(
name := "cabbit_ce2",
libraryDependencies += "co.fs2" %% "fs2-core" % fs2VersionCE2
)
val ce3 = (project in file("ce3"))
.dependsOn(core)
.settings(commonSettings)
.settings(publishSettings)
.settings(
name := "cabbit",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
"com.dimafeng" %% "testcontainers-scala-rabbitmq" % testContainersVersion % Test,
"org.slf4j" % "slf4j-simple" % slf4jVersion % Test
),
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) =>
List(
"com.github.pureconfig" %% "pureconfig" % pureconfigVersion % Test,
"com.github.pureconfig" %% "pureconfig-cats" % pureconfigVersion % Test
)
case _ =>
Nil
}
},
libraryDependencies ++= Seq(
"co.fs2" %% "fs2-core" % fs2VersionCE3,
"com.dimafeng" %% "testcontainers-scala-rabbitmq" % testContainersVersion % Test
),
Test / publishArtifact := true
)
val circe = (project in file("circe"))
.dependsOn(core)
.settings(commonSettings)
.settings(publishSettings)
.settings(
name := "cabbit-circe",
libraryDependencies += "io.circe" %% "circe-core" % circeVersion
)