-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
96 lines (88 loc) · 3.11 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
import Dependencies._
import ScalacOptions._
val projectName = "exploring-refined-types"
val projectDescription = "Exploring type refinements"
val projectVersion = "0.2.0"
val scala213 = "2.13.11"
inThisBuild(
Seq(
version := projectVersion,
scalaVersion := scala213,
publish / skip := true,
libraryDependencies ++= Seq(
munit,
kindProjectorPlugin,
betterMonadicForPlugin
) ++ Seq(
scalaTest,
scalaCheck
).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(`exploring-refined`, `exploring-singleton-ops`)
.settings(
name := projectName,
description := projectDescription,
crossScalaVersions := Seq.empty
)
lazy val `exploring-refined` = (project in file("exploring-refined"))
.dependsOn(compat213, util)
.settings(
name := "exploring-refined",
description := "Exploring the 'Refined' library",
scalacOptions ++= scalacOptionsFor(scalaVersion.value),
// console / scalacOptions := removeScalacOptionXlintUnusedForConsoleFrom(scalacOptions.value),
libraryDependencies ++= Seq(
shapeless,
fs2Io,
refined
),
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scala-lang" % "scala-reflect" % scalaVersion.value
)
)
lazy val `exploring-singleton-ops` = (project in file("exploring-singleton-ops"))
.dependsOn(compat213, util)
.settings(
name := "exploring-singleton-ops", // singleton-ops only works with the typelevel scala compiler.
description := "Exploring the 'singleton-ops' library",
scalacOptions ++= scalacOptionsFor(scalaVersion.value),
// console / scalacOptions := removeScalacOptionXlintUnusedForConsoleFrom(scalacOptions.value),
libraryDependencies ++= Seq(
shapeless,
fs2Io
// singletonOps // singleton-ops only works with the typelevel scala compiler.
),
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scala-lang" % "scala-reflect" % scalaVersion.value
)
)
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)
)