-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
96 lines (87 loc) · 2.61 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
Global / onChangedBuildSource := ReloadOnSourceChanges
val repo = "bucky-epimetheus"
ThisBuild / organization := "io.cardell"
ThisBuild / scmInfo := Some(
ScmInfo(
url(s"https://github.com/alexcardell/$repo"),
s"scm:git@github.com:alexcardell/$repo.git"
)
)
ThisBuild / licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
)
ThisBuild / developers := List(
Developer(
"alexcardell",
"Alex Cardell",
"29524087+alexcardell@users.noreply.github.com",
url("https://github.com/alexcardell")
)
)
ThisBuild / homepage := Some(
url(s"https://github.com/alexcardell/$repo")
)
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
ThisBuild / versionScheme := Some("early-semver")
lazy val scala2_12 = "2.12.15"
lazy val scala2_13 = "2.13.12"
// TODO cross publish
lazy val crossVersions = Seq(scala2_13)
ThisBuild / crossScalaVersions := crossVersions
ThisBuild / scalaVersion := scala2_13
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.6.0"
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
lazy val commonSettings = Seq(
addCompilerPlugin(
"org.typelevel" % "kind-projector" % "0.13.2" cross CrossVersion.full
),
scalacOptions := Seq("-Wunused")
)
lazy val root = project
.in(file("."))
.settings(commonSettings: _*)
.settings(
name := s"$repo-root",
publishArtifact := false,
publish / skip := false
)
.aggregate(core, docs)
lazy val core = project
.in(file("core"))
.settings(commonSettings: _*)
.settings(
name := s"$repo",
libraryDependencies ++= Seq(
"com.itv" %% "bucky-core" % "3.1.0",
"io.chrisdavenport" %% "epimetheus" % "0.6.0-M2",
"com.disneystreaming" %% "weaver-cats" % "0.8.0" % Test,
"com.itv" %% "bucky-test" % "3.1.0" % Test,
"io.circe" %% "circe-core" % "0.14.1" % Test,
"io.circe" %% "circe-generic" % "0.14.1" % Test,
"com.itv" %% "bucky-circe" % "3.1.0" % Test
),
testFrameworks += new TestFramework("weaver.framework.CatsEffect")
)
lazy val docs = project
.in(file("mdoc-src"))
.settings(commonSettings: _*)
.dependsOn(core)
.settings(
publishArtifact := false,
publish / skip := false
)
.settings(
moduleName := s"$repo-docs",
mdocVariables := Map(
"VERSION" -> version.value
)
)
.enablePlugins(MdocPlugin)
addCommandAlias("fix", "scalafmtAll;scalafmtSbt;scalafixAll")
addCommandAlias(
"check",
List("scalafmtCheckAll", "scalafmtSbtCheck", "scalafix --check")
.mkString(";")
)