-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
132 lines (121 loc) · 4.39 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
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
import Dependencies._
import ScalacOptions._
val projectName = "Exploring Recursion Schemes"
val projectDescription = "Exploring Recursion Schemes"
val projectVersion = "0.1.0"
val scala212 = "2.12.10"
val scala213 = "2.13.1"
val supportedScalaVersions = List(scala212, scala213)
inThisBuild(
Seq(
version := projectVersion,
scalaVersion := scala212,
crossScalaVersions := supportedScalaVersions,
publish / skip := true,
libraryDependencies ++= Seq(
collectionCompat,
silencerLib,
silencerPlugin,
kindProjectorPlugin,
betterMonadicForPlugin
) ++ Seq(
scalaTest,
scalaCheck,
scalaTestPlusCheck,
scalaCheckShapeless,
munit
).map(_ % Test),
Test / parallelExecution := false,
// S = Small Stack Traces, D = print Duration
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oSD"),
// run 100 tests for each property // -s = -minSuccessfulTests
Test / testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-s", "100"),
testFrameworks += new TestFramework("munit.Framework"),
initialCommands :=
s"""|
|import scala.util.chaining._
|println
|""".stripMargin // initialize REPL
)
)
lazy val root = (project in file("."))
.aggregate(
core,
`olikitty-fby-examples`,
`recursion-scheme-implementations`,
`exploring-matryoshka`,
`exploring-droste`
)
.settings(
name := projectName,
description := projectDescription,
crossScalaVersions := Seq.empty
)
lazy val core = (project in file("core"))
.dependsOn(compat213, util)
.settings(
name := "core",
description := "My gorgeous core App",
scalacOptions ++= scalacOptionsFor(scalaVersion.value),
console / scalacOptions := removeScalacOptionXlintUnusedForConsoleFrom(scalacOptions.value),
libraryDependencies ++= Seq(
shapeless,
fs2Core,
fs2Io
)
)
lazy val `olikitty-fby-examples` = (project in file("olikitty-fby-examples"))
.dependsOn(compat213, util)
.settings(
name := "olikitty-fby-examples",
description := "Oli Kitty's f(by) examples",
scalacOptions ++= scalacOptionsFor(scalaVersion.value),
console / scalacOptions := removeScalacOptionXlintUnusedForConsoleFrom(scalacOptions.value),
libraryDependencies ++= Seq(fs2Io)
)
lazy val `recursion-scheme-implementations` = (project in file("recursion-scheme-implementations"))
.dependsOn(compat213, util)
.settings(
name := "recursion-scheme-implementations",
description := "Demo implementations of recursion schemes",
scalaVersion := scala212, // matryoshka is not yet released for 2.13
crossScalaVersions := Seq(scala212),
scalacOptions ++= scalacOptionsFor(scalaVersion.value),
console / scalacOptions := removeScalacOptionXlintUnusedForConsoleFrom(scalacOptions.value),
libraryDependencies ++= Seq(matryoshkaCore)
)
lazy val `exploring-matryoshka` = (project in file("exploring-matryoshka"))
.dependsOn(compat213, util)
.settings(
name := "exploring-matryoshka",
description := "Exploring Matryoshka recursion scheme library",
scalaVersion := scala212, // matryoshka is not yet released for 2.13
crossScalaVersions := Seq(scala212),
scalacOptions ++= scalacOptionsFor(scalaVersion.value),
console / scalacOptions := removeScalacOptionXlintUnusedForConsoleFrom(scalacOptions.value),
libraryDependencies ++= Seq(matryoshkaCore)
)
lazy val `exploring-droste` = (project in file("exploring-droste"))
.dependsOn(compat213, util)
.settings(
name := "exploring-droste",
description := "Exploring Droste recursion scheme library",
scalacOptions ++= scalacOptionsFor(scalaVersion.value),
console / scalacOptions := removeScalacOptionXlintUnusedForConsoleFrom(scalacOptions.value),
libraryDependencies ++= Seq(drosteCore)
)
lazy val compat213 = (project in file("compat213"))
.settings(
name := "compat213",
description := "compat library providing features of Scala 2.13 backported to 2.12",
scalacOptions ++= scalacOptionsFor(scalaVersion.value)
)
lazy val util = (project in file("util"))
.enablePlugins(BuildInfoPlugin)
.settings(
name := "util",
description := "Utilities",
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "build",
scalacOptions ++= scalacOptionsFor(scalaVersion.value)
)