forked from VladKopanev/zio-saga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
113 lines (106 loc) · 3.59 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
import com.typesafe.sbt.SbtPgp.autoImportImpl.pgpSecretRing
import sbt.file
name := "zio-saga"
val mainScala = "2.13.8"
val allScala = Seq("2.12.16", mainScala, "3.1.3")
inThisBuild(
List(
organization := "com.vladkopanev",
homepage := Some(url("https://github.com/VladKopanev/zio-saga")),
licenses := List("MIT License" -> url("https://opensource.org/licenses/MIT")),
developers := List(
Developer(
"VladKopanev",
"Vladislav Kopanev",
url("http://vladkopanev.com")
)
),
scmInfo := Some(
ScmInfo(url("https://github.com/VladKopanev/zio-saga"), "scm:git:[email protected]/VladKopanev/zio-saga.git")
),
pgpPublicRing := file("./travis/local.pubring.asc"),
pgpSecretRing := file("./travis/local.secring.asc"),
releaseEarlyWith := SonatypePublisher
)
)
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)
lazy val core = project
.in(file("core"))
.settings(
commonSettings,
name := "zio-saga-core",
crossScalaVersions := allScala,
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % Versions.Zio,
"dev.zio" %% "zio-test" % Versions.Zio % "test",
"dev.zio" %% "zio-test-sbt" % Versions.Zio % "test"
),
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
lazy val examples = project
.in(file("examples"))
.settings(
commonSettings,
scalaVersion := mainScala,
coverageEnabled := false,
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.10",
"dev.zio" %% "zio-interop-cats" % "3.2.9.0",
"org.typelevel" %% "log4cats-core" % Versions.Log4Cats,
"org.typelevel" %% "log4cats-slf4j" % Versions.Log4Cats,
"io.circe" %% "circe-generic" % Versions.Circe,
"io.circe" %% "circe-parser" % Versions.Circe,
"org.http4s" %% "http4s-circe" % Versions.Http4s,
"org.http4s" %% "http4s-dsl" % Versions.Http4s,
"org.http4s" %% "http4s-blaze-server" % Versions.Http4s,
"org.tpolecat" %% "doobie-core" % Versions.Doobie,
"org.tpolecat" %% "doobie-hikari" % Versions.Doobie,
"org.tpolecat" %% "doobie-postgres" % Versions.Doobie,
// compilerPlugin("org.scalamacros" %% "paradise" % "2.1.0"),
compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full),
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
)
)
.dependsOn(core % "compile->compile")