-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sbt
More file actions
59 lines (52 loc) · 2.01 KB
/
build.sbt
File metadata and controls
59 lines (52 loc) · 2.01 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
50
51
52
53
54
55
56
57
58
59
Global / excludeLintKeys += organization
val scalafixDeps = Seq(
"com.github.liancheng" %% "organize-imports" % "0.6.0"
)
val devs = List(
Developer("pdalpra", "Pierre Dal-Pra", "p.dalpra@stuart.com", url("https://stuart.com")),
Developer("aartigao", "Alan Artigao Carreño", "a.artigao@stuart.com", url("https://stuart.com"))
)
inThisBuild(
Seq(
scalaVersion := "2.13.8",
crossScalaVersions := List(scalaVersion.value, "3.2.1"),
versionScheme := Some("semver-spec"),
organization := "com.stuart",
homepage := Some(url("https://github.com/StuartApp/zcaffeine")),
licenses := List(License.Apache2),
developers := devs,
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
scalafixDependencies ++= scalafixDeps
)
)
val zioVersion = "2.0.4"
val zcaffeine = (project in file("."))
.settings(fmtAllAlias)
.settings(organization := "com.stuart")
.settings(
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
autoAPIMappings := true,
Compile / doc / scalacOptions ++= scaladocOptions(scalaVersion.value),
libraryDependencies ++= Seq(
"com.github.ben-manes.caffeine" % "caffeine" % "3.1.2",
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-prelude" % "1.0.0-RC15",
"org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2",
// Testing
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test"
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
)
lazy val fmtAllAlias = addCommandAlias(
"fmt",
List(
"scalafixAll",
"scalafmtAll",
"scalafmtSbt"
).mkString(";", ";", "")
)
def scaladocOptions(scalaVersion: String): Seq[String] =
if (scalaVersion.startsWith("2")) List("-skip-packages", "zio") else Nil