-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
93 lines (86 loc) · 2.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import java.time.LocalDate
ThisBuild / scalafixDependencies += Dependencies.organizeImports
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / scalaVersion := crossScalaVersions.value.last
ThisBuild / crossScalaVersions := Seq("2.13.12", "3.3.1")
addCommandAlias("codeFmt", ";headerCreate;scalafmtAll;scalafmtSbt;scalafixAll")
addCommandAlias("codeVerify", ";scalafmtCheckAll;scalafmtSbtCheck;scalafixAll --check;headerCheck")
lazy val commonSettings = Seq(
organization := "com.fgrutsch",
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
sonatypeProfileName := "com.fgrutsch",
startYear := Some(2021),
homepage := Some(url("https://github.com/fgrutsch/akka-persistence-mapdb")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
scmInfo := Some(
ScmInfo(homepage.value.get, "scm:git:https://github.com/fgrutsch/akka-persistence-mapdb.git")
),
developers += Developer(
"contributors",
"Contributors",
"",
url("https://github.com/fgrutsch/akka-persistence-mapdb/graphs/contributors")
),
scalacOptions ++= {
val common = Seq(
"-deprecation",
"-encoding",
"utf-8",
"-feature",
"-language:higherKinds",
"-unchecked",
"-Xfatal-warnings"
)
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
common ++ List(
"-explain-types"
// "-Ysafe-init" // problems with akka.persistence.Eventsourced
)
case _ =>
common ++ List(
"-explaintypes",
"-Xcheckinit",
"-Wdead-code",
"-Wunused:imports",
"-Xsource:3"
)
}
},
Test / parallelExecution := false,
headerLicense := Some(HeaderLicense.ALv2(LocalDate.now.getYear.toString, "akka-persistence-mapdb contributors")),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
lazy val root = project
.in(file("."))
.settings(commonSettings)
.settings(publish / skip := true)
.aggregate(core, docs)
lazy val core = project
.in(file("core"))
.settings(commonSettings)
.settings(
name := "akka-persistence-mapdb",
libraryDependencies ++= Dependencies.core,
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => Nil
case _ => Seq(compilerPlugin(Dependencies.betterMonadicFor))
}
}
)
lazy val docs = project
.in(file("docs"))
.settings(commonSettings)
.settings(
name := "akka-persistence-mapdb-docs",
publish / skip := true,
githubWorkflowArtifactUpload := false,
paradoxProperties ++= Map(
"version" -> version.value
)
)
.dependsOn(core)
.enablePlugins(ParadoxPlugin)