-
Notifications
You must be signed in to change notification settings - Fork 74
/
build.sbt
124 lines (110 loc) · 3.68 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
import com.typesafe.tools.mima.core._
val Scala213 = "2.13.15"
val Scala212 = "2.12.20"
val Scala3 = "3.3.4"
ThisBuild / tlBaseVersion := "2.7"
ThisBuild / crossScalaVersions := Seq(Scala213, Scala212, Scala3)
ThisBuild / scalaVersion := Scala213
ThisBuild / startYear := Some(2018)
ThisBuild / developers := List(
Developer(
"christopherdavenport",
"Christopher Davenport",
new java.net.URL("https://christopherdavenport.github.io/")
),
Developer(
"lorandszakacs",
"Loránd Szakács",
new java.net.URL("https://github.com/lorandszakacs")
)
)
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"), JavaSpec.temurin("11"))
ThisBuild / tlVersionIntroduced := Map("3" -> "2.1.1")
val catsV = "2.11.0"
val catsEffectV = "3.5.5"
val slf4jV = "1.7.36"
val munitCatsEffectV = "2.0.0"
val logbackClassicV = "1.2.13"
Global / onChangedBuildSource := ReloadOnSourceChanges
lazy val root = tlCrossRootProject.aggregate(core, testing, noop, slf4j, docs, `js-console`)
lazy val docs = project
.in(file("site"))
.enablePlugins(TypelevelSitePlugin)
.dependsOn(slf4j)
lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(commonSettings)
.settings(
name := "log4cats-core",
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % catsV,
"org.typelevel" %%% "cats-effect-std" % catsEffectV
),
libraryDependencies ++= {
if (tlIsScala3.value) Seq.empty
else Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided)
}
)
.nativeSettings(commonNativeSettings)
lazy val testing = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(commonSettings)
.dependsOn(core)
.settings(
name := "log4cats-testing",
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-effect" % catsEffectV,
"ch.qos.logback" % "logback-classic" % logbackClassicV % Test
)
)
.nativeSettings(commonNativeSettings)
lazy val noop = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(commonSettings)
.dependsOn(core)
.settings(
name := "log4cats-noop"
) // migrated to core, so we check that core is compatible with old noop artifacts
.jvmSettings(
mimaCurrentClassfiles := (core.jvm / Compile / classDirectory).value
)
.jsSettings(
mimaCurrentClassfiles := (core.js / Compile / classDirectory).value
)
.nativeSettings(
mimaCurrentClassfiles := (core.native / Compile / classDirectory).value
)
.nativeSettings(commonNativeSettings)
lazy val slf4j = project
.settings(commonSettings)
.dependsOn(core.jvm)
.settings(
name := "log4cats-slf4j",
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % slf4jV,
"org.typelevel" %%% "cats-effect" % catsEffectV,
"ch.qos.logback" % "logback-classic" % logbackClassicV % Test
),
libraryDependencies ++= {
if (tlIsScala3.value) Seq.empty
else Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided)
}
)
lazy val `js-console` = project
.settings(commonSettings)
.dependsOn(core.js)
.settings(
name := "log4cats-js-console",
tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "2.6.0").toMap,
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-effect-kernel" % catsEffectV
)
)
.enablePlugins(ScalaJSPlugin)
lazy val commonSettings = Seq(
libraryDependencies ++= Seq(
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectV % Test
)
)
lazy val commonNativeSettings = Seq(
tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "2.4.1").toMap
)