forked from zio/zio-actors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
138 lines (127 loc) · 4.95 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
import BuildHelper._
inThisBuild(
List(
organization := "dev.zio",
homepage := Some(url("https://zio.github.io/zio-actors/")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer(
"jdegoes",
"John De Goes",
url("http://degoes.net")
),
Developer(
"softinio",
"Salar Rahmanian",
url("https://www.softinio.com")
)
),
pgpPassphrase := sys.env.get("PGP_PASSWORD").map(_.toArray),
pgpPublicRing := file("/tmp/public.asc"),
pgpSecretRing := file("/tmp/secret.asc"),
scmInfo := Some(
ScmInfo(url("https://github.com/zio/zio-actors/"), "scm:git:[email protected]:zio/zio-actors.git")
)
)
)
addCommandAlias("fmt", "all scalafmtSbt scalafmt test:scalafmt")
addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck")
val zioVersion = "1.0.4"
val zioNioVersion = "1.0.0-RC9"
val zioConfigVersion = "1.0.0-RC30-1"
val zioInteropCatsVersion = "2.4.1.0"
val akkaActorTypedVersion = "2.6.15"
val doobieVersion = "0.13.4"
lazy val root =
project
.in(file("."))
.settings(skip in publish := true)
.aggregate(zioActors, zioActorsPersistence, zioActorsPersistenceJDBC, examples, zioActorsAkkaInterop)
lazy val zioActors = module("zio-actors", "actors")
.enablePlugins(BuildInfoPlugin)
.settings(buildInfoSettings("zio.actors"))
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test",
"dev.zio" %% "zio-nio" % zioNioVersion,
"dev.zio" %% "zio-config-typesafe" % zioConfigVersion,
"org.scala-lang" % "scala-reflect" % scalaVersion.value
),
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.settings(
stdSettings("zio-actors")
)
lazy val zioActorsPersistence = module("zio-actors-persistence", "persistence")
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test"
),
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(zioActors)
lazy val zioActorsPersistenceJDBC = module("zio-actors-persistence-jdbc", "persistence-jdbc")
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test",
"dev.zio" %% "zio-interop-cats" % zioInteropCatsVersion,
"org.tpolecat" %% "doobie-core" % doobieVersion,
"org.tpolecat" %% "doobie-hikari" % doobieVersion,
"org.tpolecat" %% "doobie-postgres" % doobieVersion
),
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(zioActorsPersistence)
lazy val examples = module("zio-actors-examples", "examples")
.settings(
skip in publish := true,
fork := true,
libraryDependencies ++= Seq(
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test"
),
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(zioActors, zioActorsPersistence, zioActorsPersistenceJDBC)
lazy val zioActorsAkkaInterop = module("zio-actors-akka-interop", "akka-interop")
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test",
"com.typesafe.akka" %% "akka-actor-typed" % akkaActorTypedVersion
),
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(zioActors)
def module(moduleName: String, fileName: String): Project =
Project(moduleName, file(fileName))
.settings(stdSettings(moduleName))
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion
)
)
lazy val docs = project
.in(file("zio-actors-docs"))
.settings(
skip.in(publish) := true,
moduleName := "zio-actors-docs",
scalacOptions -= "-Yno-imports",
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion
),
unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(root),
target in (ScalaUnidoc, unidoc) := (baseDirectory in LocalRootProject).value / "website" / "static" / "api",
cleanFiles += (target in (ScalaUnidoc, unidoc)).value,
docusaurusCreateSite := docusaurusCreateSite.dependsOn(unidoc in Compile).value,
docusaurusPublishGhpages := docusaurusPublishGhpages.dependsOn(unidoc in Compile).value
)
.dependsOn(zioActors, zioActorsPersistence, zioActorsAkkaInterop)
.enablePlugins(MdocPlugin, DocusaurusPlugin, ScalaUnidocPlugin)