This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.sbt
131 lines (121 loc) · 4.25 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
import sbt.file
name := "cats-saga"
val mainScala = "2.13.8"
val allScala = Seq(mainScala, "2.12.16", "3.1.3")
inThisBuild(
List(
organization := "com.vladkopanev",
homepage := Some(url("https://github.com/VladKopanev/cats-saga")),
licenses := List("MIT License" -> url("https://opensource.org/licenses/MIT")),
developers := List(
Developer(
"VladKopanev",
"Vladislav Kopanev",
"ivengo53@gmail.com",
url("http://vladkopanev.com")
)
),
scmInfo := Some(
ScmInfo(url("https://github.com/VladKopanev/cats-saga"), "scm:git:git@github.com/VladKopanev/cats-saga.git")
)
)
)
lazy val commonSettings = Seq(
scalaVersion := mainScala,
scalacOptions ++= Seq(
"-deprecation",
"-encoding",
"UTF-8",
"-explaintypes",
"-Yrangepos",
"-feature",
"-Xfuture",
"-language:higherKinds",
"-language:existentials",
"-language:implicitConversions",
"-unchecked",
"-Xlint:_,-type-parameter-shadow",
"-Ywarn-numeric-widen",
"-Ywarn-unused",
"-Ywarn-value-discard"
) ++ (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Seq("-Ykind-projector", "-unchecked")
case Some((2, 12)) =>
Seq(
"-Xsource:2.13",
"-Yno-adapted-args",
"-Ypartial-unification",
"-Ywarn-extra-implicit",
"-Ywarn-inaccessible",
"-Ywarn-infer-any",
"-Ywarn-nullary-override",
"-Ywarn-nullary-unit",
"-opt-inline-from:<source>",
"-opt-warnings",
"-opt:l:inline"
)
case _ => Nil
}),
resolvers ++= Seq(Resolver.sonatypeRepo("snapshots"), Resolver.sonatypeRepo("releases"))
)
lazy val root = project
.in(file("."))
.aggregate(core)
val catsVersion = "3.3.14"
val catsRetryVersion = "3.1.0"
val scalaTestVersion = "3.2.12"
val kindProjectorVersion = "0.13.2"
val disciplineCoreVersion = "1.5.1"
val disciplineScalatestVersion = "2.2.0"
lazy val core = project
.in(file("core"))
.settings(
commonSettings,
name := "cats-saga",
crossScalaVersions := allScala,
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % catsVersion,
"org.typelevel" %% "cats-laws" % "2.8.0" % Test,
"org.typelevel" %% "cats-effect-laws" % catsVersion % Test,
"org.typelevel" %% "cats-effect-testkit" % catsVersion % Test,
"org.scalatest" %% "scalatest" % scalaTestVersion % Test,
"org.typelevel" %% "discipline-core" % disciplineCoreVersion % Test,
"org.typelevel" %% "discipline-scalatest" % disciplineScalatestVersion % Test,
"com.github.cb372" %% "cats-retry" % catsRetryVersion % Optional
),
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Nil
case _ =>
List(compilerPlugin("org.typelevel" % "kind-projector" % kindProjectorVersion cross CrossVersion.full))
}
}
)
val http4sVersion = "0.23.0-RC1"
val log4CatsVersion = "2.1.1"
val doobieVersion = "1.0.0-M5"
val circeVersion = "0.14.1"
lazy val examples = project
.in(file("examples"))
.settings(
commonSettings,
coverageEnabled := false,
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.github.cb372" %% "cats-retry" % catsRetryVersion,
"org.typelevel" %% "log4cats-slf4j" % log4CatsVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"org.http4s" %% "http4s-circe" % http4sVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.http4s" %% "http4s-blaze-server" % http4sVersion,
"org.tpolecat" %% "doobie-core" % doobieVersion,
"org.tpolecat" %% "doobie-hikari" % doobieVersion,
"org.tpolecat" %% "doobie-postgres" % doobieVersion,
compilerPlugin("org.typelevel" %% "kind-projector" % kindProjectorVersion cross CrossVersion.full),
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
)
)
.dependsOn(core % "compile->compile")