forked from business4s/workflows4s
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
158 lines (144 loc) · 6.69 KB
/
Copy pathbuild.sbt
File metadata and controls
158 lines (144 loc) · 6.69 KB
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import org.typelevel.scalacoptions.ScalacOptions
lazy val `workflows4s` = (project in file("."))
.settings(commonSettings)
.aggregate(
`workflows4s-core`,
`workflows4s-bpmn`,
`workflows4s-pekko`,
`workflows4s-example`,
`workflows4s-doobie`,
`workflows4s-filesystem`,
`workflows4s-quartz`,
)
lazy val `workflows4s-core` = (project in file("workflows4s-core"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % "3.6.3",
"co.fs2" %% "fs2-core" % "3.12.2",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.6",
"io.circe" %% "circe-core" % "0.14.14", // for model serialization
"io.circe" %% "circe-generic" % "0.14.14", // for model serialization
"com.lihaoyi" %% "sourcecode" % "0.4.4", // for auto naming
"ch.qos.logback" % "logback-classic" % "1.5.18" % Test,
),
Test / parallelExecution := false,
)
lazy val `workflows4s-bpmn` = (project in file("workflows4s-bpmn"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.camunda.bpm.model" % "camunda-bpmn-model" % "7.23.0",
),
)
.dependsOn(`workflows4s-core`)
lazy val `workflows4s-pekko` = (project in file("workflows4s-pekko"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.apache.pekko" %% "pekko-persistence-typed" % pekkoVersion,
"org.apache.pekko" %% "pekko-cluster-typed" % pekkoVersion,
"org.apache.pekko" %% "pekko-cluster-sharding-typed" % pekkoVersion,
"org.apache.pekko" %% "pekko-persistence-testkit" % pekkoVersion % Test,
"org.apache.pekko" %% "pekko-persistence-jdbc" % "1.1.0" % Test,
"com.h2database" % "h2" % "2.3.232" % Test,
"io.r2dbc" % "r2dbc-h2" % "1.0.0.RELEASE" % Test,
),
)
.dependsOn(`workflows4s-core` % "compile->compile;test->test")
lazy val `workflows4s-doobie` = (project in file("workflows4s-doobie"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.tpolecat" %% "doobie-core" % "1.0.0-RC10",
"com.dimafeng" %% "testcontainers-scala-scalatest" % testcontainersScalaVersion % Test,
"com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test,
"org.postgresql" % "postgresql" % "42.7.8" % Test,
"org.xerial" % "sqlite-jdbc" % "3.50.3.0" % Test,
),
)
.dependsOn(`workflows4s-core` % "compile->compile;test->test")
lazy val `workflows4s-filesystem` = (project in file("workflows4s-filesystem"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"co.fs2" %% "fs2-io" % "3.12.2",
"ch.qos.logback" % "logback-classic" % "1.5.18" % Test,
),
)
.dependsOn(`workflows4s-core` % "compile->compile;test->test")
lazy val `workflows4s-quartz` = (project in file("workflows4s-quartz"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.quartz-scheduler" % "quartz" % "2.5.0",
"ch.qos.logback" % "logback-classic" % "1.5.14" % Test,
),
)
.dependsOn(`workflows4s-core` % "compile->compile;test->test")
lazy val `workflows4s-example` = (project in file("workflows4s-example"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.apache.pekko" %% "pekko-http" % pekkoHttpVersion, // for interacting with the app
"org.apache.pekko" %% "pekko-cluster-sharding-typed" % pekkoVersion, // for realistic example and spawning actors
"org.apache.pekko" %% "pekko-persistence-jdbc" % "1.1.1", // published locally until the release is there
"org.apache.pekko" %% "pekko-serialization-jackson" % "1.2.0",
"com.h2database" % "h2" % "2.3.232",
"io.r2dbc" % "r2dbc-h2" % "1.0.0.RELEASE",
"com.github.pjfanning" %% "pekko-http-circe" % "3.3.0",
"ch.qos.logback" % "logback-classic" % "1.5.18",
"org.scalamock" %% "scalamock" % "7.5.0" % Test,
"org.apache.pekko" %% "pekko-actor-testkit-typed" % pekkoVersion % Test,
"com.dimafeng" %% "testcontainers-scala-scalatest" % testcontainersScalaVersion % Test,
"com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test,
"org.postgresql" % "postgresql" % "42.7.8" % Test,
"org.xerial" % "sqlite-jdbc" % "3.50.3.0" % Test,
),
Test / parallelExecution := false, // otherwise akka clusters clash
publish / skip := true,
)
.dependsOn(
`workflows4s-core` % "compile->compile;test->test",
`workflows4s-bpmn`,
`workflows4s-pekko` % "compile->compile;test->test",
`workflows4s-doobie` % "compile->compile;test->test",
`workflows4s-filesystem`,
`workflows4s-quartz`,
)
lazy val commonSettings = Seq(
scalaVersion := "3.7.3",
scalacOptions ++= Seq("-no-indent", "-Xmax-inlines", "64", "-explain-cyclic", "-Ydebug-cyclic"),
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
),
// scalafix settings
semanticdbEnabled := true, // enable SemanticDB
organization := "org.business4s",
homepage := Some(url("https://business4s.github.io/workflows4s/")),
licenses := List(License.MIT),
developers := List(
Developer(
"Krever",
"Voytek Pituła",
"w.pitula@gmail.com",
url("https://v.pitula.me"),
),
),
versionScheme := Some("semver-spec"),
Test / tpolecatExcludeOptions += ScalacOptions.warnNonUnitStatement,
)
lazy val pekkoVersion = "1.2.0"
lazy val pekkoHttpVersion = "1.2.0"
lazy val testcontainersScalaVersion = "0.43.0"
addCommandAlias("prePR", List("compile", "Test / compile", "test", "scalafmtCheckAll").mkString(";", ";", ""))
lazy val stableVersion = taskKey[String]("stableVersion")
stableVersion := {
if (isVersionStable.value && !isSnapshot.value) version.value
else previousStableVersion.value.getOrElse("unreleased")
}
ThisBuild / publishTo := {
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
else localStaging.value
}