This repository has been archived by the owner on Jun 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sbt
64 lines (57 loc) · 2.29 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
organization := "com.emarsys"
name := "scheduler"
crossScalaVersions := List("2.13.10", "2.12.17")
scalacOptions ++= scalacOptionsFor(scalaVersion.value)
scalafmtOnCompile := true
libraryDependencies += "org.typelevel" %% "cats-core" % "2.9.0"
libraryDependencies += "org.typelevel" %% "cats-effect" % "2.5.5"
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.17.0" % Test
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.15" % Test
libraryDependencies += "org.typelevel" %% "cats-laws" % "2.9.0" % Test
libraryDependencies += "org.typelevel" %% "discipline-scalatest" % "2.2.0" % Test
libraryDependencies += "org.typelevel" %% "cats-effect-laws" % "2.5.5" % Test
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full)
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT"))
homepage := Some(url("https://github.com/emartech/pure-scheduler"))
developers := List(
Developer("doczir", "Robert Doczi", "doczi.r@gmail.com", url("https://github.com/doczir")),
Developer("miklos-martin", "Miklos Martin", "miklos.martin@gmail.com", url("https://github.com/miklos-martin")),
Developer("suliatis", "Attila Suli", "suli.zakar.attila@gmail.com", url("https://github.com/suliatis"))
)
def scalacOptionsFor(scalaVersion: String) =
Seq(
"-language:higherKinds",
"-deprecation",
"-encoding",
"UTF-8",
"-explaintypes",
"-unchecked",
"-feature",
"-language:implicitConversions",
"-language:postfixOps",
"-Ywarn-dead-code",
"-Ywarn-extra-implicit",
"-Ywarn-numeric-widen",
"-Ywarn-unused:implicits",
"-Ywarn-unused:imports",
"-Ywarn-unused:locals",
"-Ywarn-unused:params",
"-Ywarn-unused:patvars",
"-Ywarn-unused:privates",
"-Xlint",
"-P:kind-projector:underscore-placeholders"
) ++ (if (is2_12(scalaVersion))
Seq(
"-Ypartial-unification",
"-Yno-adapted-args",
"-Ywarn-inaccessible",
"-Ywarn-nullary-override",
"-Ywarn-nullary-unit",
"-Ywarn-infer-any"
)
else Seq())
def is2_12(scalaVersion: String): Boolean =
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, 12)) => true
case _ => false
}