This repository has been archived by the owner on Jan 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathbuild.sbt
142 lines (131 loc) · 5.1 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
139
140
141
142
import BuildHelper._
inThisBuild(
List(
organization := "dev.zio",
homepage := Some(url("https://zio.dev/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 = "2.0.20"
val zioNioVersion = "2.0.1"
val zioConfigVersion = "3.0.7"
val zioInteropCatsVersion = "22.0.0.0"
val doobieVersion = "0.13.4"
// Akka cannot be upgraded since later versions have the Business Source License
val akkaActorTypedVersion = "2.6.19"
lazy val root =
project
.in(file("."))
.settings(publish / skip := true)
.aggregate(zioActors, zioActorsPersistence, zioActorsPersistenceJDBC, examples, zioActorsAkkaInterop, docs)
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
),
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(
publish / skip := 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, zioActorsAkkaInterop, 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(
moduleName := "zio-actors-docs",
scalacOptions -= "-Yno-imports",
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq("dev.zio" %% "zio" % zioVersion),
crossScalaVersions := Seq(Scala213, Scala3),
scalaVersion := Scala213,
projectName := "ZIO Actors",
mainModuleName := (zioActors / moduleName).value,
projectStage := ProjectStage.ProductionReady,
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(
zioActors,
zioActorsPersistence,
zioActorsPersistenceJDBC,
zioActorsAkkaInterop
),
docsPublishBranch := "master"
)
.dependsOn(zioActors, zioActorsPersistence, zioActorsAkkaInterop)
.enablePlugins(WebsitePlugin)