forked from VladKopanev/zio-saga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
128 lines (120 loc) · 4.05 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
import com.typesafe.sbt.SbtPgp.autoImportImpl.pgpSecretRing
import sbt.file
name := "zio-saga"
val mainScala = "2.12.10"
val allScala = Seq("2.11.12", mainScala, "2.13.1")
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",
"-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((2, 11)) =>
Seq(
"-Xfuture",
"-Yno-adapted-args",
"-Ypartial-unification",
"-Ywarn-inaccessible",
"-Ywarn-infer-any",
"-Ywarn-nullary-override",
"-Ywarn-nullary-unit"
)
case Some((2, 12)) =>
Seq(
"-Xfuture",
"-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",
"-Ypartial-unification"
)
case _ => Nil
}),
resolvers ++= Seq(Resolver.sonatypeRepo("snapshots"), Resolver.sonatypeRepo("releases"))
)
lazy val root = project
.in(file("."))
.dependsOn(examples)
.aggregate(core)
lazy val core = project
.in(file("core"))
.settings(
commonSettings,
name := "zio-saga-core",
crossScalaVersions := allScala,
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % "1.0.0-RC17",
"dev.zio" %% "zio-test" % "1.0.0-RC17" % "test",
"dev.zio" %% "zio-test-sbt" % "1.0.0-RC17" % "test"
),
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
val http4sVersion = "0.21.0-M2"
val log4CatsVersion = "1.0.1"
val doobieVersion = "0.8.4"
val circeVersion = "0.12.3"
lazy val examples = project
.in(file("examples"))
.settings(
commonSettings,
scalaVersion := mainScala,
coverageEnabled := false,
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.3",
"dev.zio" %% "zio-interop-cats" % "2.0.0.0-RC7",
"io.chrisdavenport" %% "log4cats-core" % log4CatsVersion,
"io.chrisdavenport" %% "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.scalamacros" %% "paradise" % "2.1.0"),
compilerPlugin("org.typelevel" %% "kind-projector" % "0.11.0" cross CrossVersion.full),
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
)
)
.dependsOn(core % "compile->compile")