-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
42 lines (35 loc) · 1.17 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
import _root_.io.github.nafg.mergify.dsl.*
libraryDependencies ++= List(
"org.slf4j" % "slf4j-nop" % "2.0.16",
"com.h2database" % "h2" % "2.3.232",
"org.scalatest" %% "scalatest" % "3.2.19" % Test
)
scalacOptions += "-deprecation"
run / fork := true
libraryDependencies += "com.typesafe.slick" %% "slick" % "3.5.2"
mergifyExtraConditions := Seq(
(Attr.Author :== "scala-steward") ||
(Attr.Author :== "slick-scala-steward[bot]") ||
(Attr.Author :== "renovate[bot]")
)
// 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 / githubWorkflowPublishTargetBranches := Seq()
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.zulu("11"))
ThisBuild / githubWorkflowBuild += WorkflowStep.Sbt(
List("runAll"),
name = Some(s"Run all main classes")
)