-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
46 lines (37 loc) · 1.32 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
import _root_.io.github.nafg.mergify.dsl.*
ThisBuild / scalaVersion := "2.13.15"
ThisBuild / scalacOptions += "-Xsource:3"
mergifyExtraConditions := Seq(
(Attr.Author :== "scala-steward") ||
(Attr.Author :== "slick-scala-steward[bot]") ||
(Attr.Author :== "renovate[bot]")
)
libraryDependencies ++= List(
"org.slf4j" % "slf4j-nop" % "2.0.16",
"com.h2database" % "h2" % "2.3.232",
"org.xerial" % "sqlite-jdbc" % "3.47.1.0"
)
scalacOptions += "-deprecation"
run / fork := true
libraryDependencies += "com.typesafe.slick" %% "slick" % "3.5.2"
// based on https://stackoverflow.com/a/63780833/333643
lazy val runAll = taskKey[Unit]("Run all main classes")
def runAllIn(config: Configuration) = Def.task {
val s = streams.value
val cp = (config / fullClasspath).value
val r = (config / run / runner).value
val classes = (config / discoveredMainClasses).value
classes.foreach { className =>
r.run(className, cp.files, Seq(), s.log).get
}
}
runAll := {
runAllIn(Compile).value
runAllIn(Test).value
}
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.zulu("11"))
ThisBuild / githubWorkflowPublishTargetBranches := Seq()
ThisBuild / githubWorkflowBuild += WorkflowStep.Sbt(
List("runAll"),
name = Some(s"Run all main classes")
)