forked from Kirill5k/mongo4cats
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
125 lines (114 loc) · 4.04 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
import xerial.sbt.Sonatype.GitHubHosting
import ReleaseTransformations._
import microsites.CdnDirectives
lazy val scala212 = "2.12.14"
lazy val scala213 = "2.13.12"
lazy val supportedScalaVersions = List(scala212, scala213)
ThisBuild / scalaVersion := scala213
ThisBuild / organization := "com.precog"
ThisBuild / homepage := Some(url("https://kirill5k.github.io/mongo4cats"))
ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/precog/mongo4cats"), "git@github.com:precog/mongo4cats.git"))
ThisBuild / developers := List(Developer("kirill5k", "Kirill", "immotional@aol.com", url("https://github.com/kirill5k")))
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
ThisBuild / sonatypeProjectHosting := Some(GitHubHosting("precog", "mongo4cats", "bot@precog.com"))
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / githubWorkflowPublishTargetBranches := Nil
ThisBuild / githubWorkflowScalaVersions := supportedScalaVersions
ThisBuild / githubWorkflowJavaVersions := Seq("amazon-corretto@1.17")
ThisBuild / githubOwner := "precog"
ThisBuild / githubRepository := "mongo4cats"
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
lazy val noPublish = Seq(
publish := {},
publishLocal := {},
publishArtifact := false,
publish / skip := true
)
lazy val commonSettings = Seq(
organizationName := "MongoDB Java client wrapper for Cats-Effect & FS2",
startYear := Some(2020),
licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt")),
headerLicense := Some(HeaderLicense.ALv2("2020", "Kirill5k")),
resolvers += "Apache public" at "https://repository.apache.org/content/groups/public/",
scalafmtOnCompile := true,
crossScalaVersions := supportedScalaVersions,
Compile / doc / scalacOptions ++= Seq(
"-no-link-warnings" // Suppresses problems with Scaladoc links
)
)
lazy val root = project
.in(file("."))
.settings(noPublish)
.settings(
name := "mongo4cats",
crossScalaVersions := Nil
)
.aggregate(
core,
circe,
examples,
embedded,
testkit
)
lazy val core = project
.in(file("core"))
.dependsOn(embedded % "test->compile")
.settings(commonSettings)
.settings(
name := "mongo4cats-core",
libraryDependencies ++= Dependencies.core ++ Dependencies.test,
test / parallelExecution := false)
.enablePlugins(AutomateHeaderPlugin)
lazy val circe = project
.in(file("circe"))
.dependsOn(core, embedded % "test->compile")
.settings(commonSettings)
.settings(
name := "mongo4cats-circe",
libraryDependencies ++= Dependencies.circe ++ Dependencies.test,
test / parallelExecution := false,
mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "0.4.1")
)
.enablePlugins(AutomateHeaderPlugin)
lazy val examples = project
.in(file("examples"))
.dependsOn(core, circe, embedded)
.settings(noPublish)
.settings(commonSettings)
.settings(
name := "mongo4cats-examples",
libraryDependencies ++= Dependencies.examples ++ Dependencies.test
)
.enablePlugins(AutomateHeaderPlugin)
lazy val embedded = project
.in(file("embedded"))
.settings(commonSettings)
.settings(
name := "mongo4cats-embedded",
libraryDependencies ++= Dependencies.embedded,
test / parallelExecution := false,
mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "0.4.1")
)
.enablePlugins(AutomateHeaderPlugin)
lazy val testkit = project
.in(file("testkit"))
.settings(commonSettings)
.settings(
name := "mongo4cats-testkit",
libraryDependencies ++= Dependencies.testkit,
)
.dependsOn(core)
.enablePlugins(AutomateHeaderPlugin)