-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
49 lines (36 loc) · 1.31 KB
/
build.sbt
File metadata and controls
49 lines (36 loc) · 1.31 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
ThisBuild / version := "1.0.0"
ThisBuild / scalaVersion := "3.3.1"
ThisBuild / organization := "io.github.reqt"
console / initialCommands := "import reqt.constraints.*, reqt.solver.*"
Global / onChangedBuildSource := ReloadOnSourceChanges
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test
lazy val nameOfThisBuild = "reqt-constraints"
lazy val `reqt-constraints` = (project in file("."))
.settings(
name := nameOfThisBuild,
scalacOptions := List("-encoding", "utf8", "-Werror", "-deprecation", "-unchecked")
)
lazy val build = taskKey[Unit]("build all the things")
build := Def.sequential(
clean,
Compile / compile,
Compile / packageBin,
Test / test,
).value
lazy val hello = taskKey[Unit]("Prints welcome message")
hello := println(s"""
*** Welcome to the $nameOfThisBuild build in sbt ***
type 'test' to run all tests
type 'package' to build jar in target/scala-x.y.z
type 'build' to do clean + all of the above
type 'console' to enter the Scala REPL with reqt.* imported
type 'hello' to see this message
""")
lazy val myStartupTransition: State => State = { s: State =>
"hello" :: s
}
Global / onLoad := {
// https://www.scala-sbt.org/1.0/docs/offline/Howto-Startup.html
val old = (Global/onLoad).value
myStartupTransition.compose(old)
}