-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
75 lines (67 loc) · 1.89 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
import Dependencies._
import MyUtil._
ThisBuild / organization := "com.migapril"
ThisBuild / scalaVersion := "2.13.12"
lazy val `pegtalk` =
project
.in(file("."))
.settings(name := "pegtalk")
.settings(commonSettings)
.settings(autoImportSettings)
.settings(dependencies)
lazy val commonSettings = {
lazy val commonCompilerPlugins = Seq(
addCompilerPlugin(com.olegpy.`better-monadic-for`),
addCompilerPlugin(org.augustjune.`context-applied`),
addCompilerPlugin(org.typelevel.`kind-projector`),
)
lazy val commonScalacOptions = Seq(
Compile / console / scalacOptions := {
(Compile / console / scalacOptions)
.value
.filterNot(_.contains("wartremover"))
.filterNot(Scalac.Lint.toSet)
.filterNot(Scalac.FatalWarnings.toSet) :+ "-Wconf:any:silent"
},
Test / console / scalacOptions :=
(Compile / console / scalacOptions).value,
)
lazy val otherCommonSettings = Seq(
update / evictionWarningOptions := EvictionWarningOptions.empty,
scalacOptions += s"-Wconf:src=${target.value}/.*:s",
)
Seq(
commonCompilerPlugins,
commonScalacOptions,
otherCommonSettings,
).reduceLeft(_ ++ _)
}
lazy val autoImportSettings = Seq(
scalacOptions +=
Seq(
"java.lang",
"scala",
"scala.Predef",
"scala.annotation",
"scala.util.chaining",
).mkString(start = "-Yimports:", sep = ",", end = ""),
Test / scalacOptions +=
Seq(
"derevo",
"derevo.scalacheck",
"org.scalacheck",
"org.scalacheck.Prop",
).mkString(start = "-Yimports:", sep = ",", end = ""),
)
lazy val dependencies = Seq(
libraryDependencies ++= Seq(
// main dependencies
org.parboiled.parboiled
),
libraryDependencies ++= Seq(
com.eed3si9n.expecty.expecty,
org.scalameta.munit,
org.typelevel.`discipline-munit`,
tf.tofu.`derevo-scalacheck`,
).map(_ % Test),
)