-
-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathbuild.sbt
More file actions
142 lines (125 loc) · 4.85 KB
/
build.sbt
File metadata and controls
142 lines (125 loc) · 4.85 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import com.typesafe.tools.mima.core._
val scala212 = "2.12.20"
val scala213 = "2.13.16"
val scala3 = "3.3.6"
val scalatestVersion = "3.2.19"
val scalacheckVersion = "1.19.0"
ThisBuild / tlJdkRelease := Some(11)
ThisBuild / scalaVersion := scala213
ThisBuild / crossScalaVersions := Seq(elems = scala212, scala213, scala3)
ThisBuild / tlFatalWarnings := false
ThisBuild / tlBaseVersion := "4.6"
ThisBuild / organization := "org.gnieh"
ThisBuild / organizationName := "Diffson Project"
ThisBuild / startYear := Some(2024)
ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers := List(
tlGitHubDev("satabin", "Lucas Satabin"),
tlGitHubDev("ybasket", "Yannick Heiber")
)
// use JDK 17
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
// Silence binary compatibility warnings for test-interface in Scala Native 0.5.x series
// has to include _native suffix due to https://github.com/sbt/sbt/issues/7140
ThisBuild / libraryDependencySchemes +=
"org.scala-native" %% "test-interface_native0.5" % VersionScheme.Always
lazy val commonSettings = Seq(
description := "Json diff/patch library",
homepage := Some(url("https://github.com/gnieh/diffson"))
)
lazy val diffson = tlCrossRootProject.aggregate(core, sprayJson, circe, playJson, ujson, testkit)
lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("core"))
.enablePlugins(ScalaUnidocPlugin)
.settings(commonSettings: _*)
.settings(
name := "diffson-core",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %%% "scala-collection-compat" % "2.13.0",
"org.typelevel" %%% "cats-core" % "2.13.0",
"org.scalatest" %%% "scalatest" % scalatestVersion % Test,
"org.scalacheck" %%% "scalacheck" % scalacheckVersion % Test
),
mimaBinaryIssueFilters ++= List(
ProblemFilters.exclude[DirectMissingMethodProblem](
"diffson.jsonpatch.package#simplediff#remembering.JsonDiffDiff"),
ProblemFilters.exclude[DirectAbstractMethodProblem]("diffson.lcs.Lcs.savedHashes")
)
)
.nativeSettings(
tlVersionIntroduced := Map("3" -> "4.7.0", "2.13" -> "4.7.0", "2.12" -> "4.7.0")
)
lazy val testkit = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("testkit"))
.settings(commonSettings: _*)
.settings(name := "diffson-testkit",
libraryDependencies ++= Seq("org.scalatest" %%% "scalatest" % scalatestVersion,
"org.scalacheck" %%% "scalacheck" % scalacheckVersion))
.nativeSettings(
tlVersionIntroduced := Map("3" -> "4.7.0", "2.13" -> "4.7.0", "2.12" -> "4.7.0")
)
.dependsOn(core)
lazy val sprayJson = crossProject(JVMPlatform)
.crossType(CrossType.Pure)
.in(file("sprayJson"))
.settings(commonSettings: _*)
.settings(name := "diffson-spray-json",
libraryDependencies += "io.spray" %% "spray-json" % "1.3.6",
tlVersionIntroduced := Map("3" -> "4.5.0"))
.dependsOn(core, testkit % Test)
lazy val playJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("playJson"))
.settings(commonSettings: _*)
.settings(name := "diffson-play-json",
libraryDependencies += "org.playframework" %%% "play-json" % "3.1.0-M3",
tlVersionIntroduced := Map("3" -> "4.3.0"))
.nativeSettings(tlVersionIntroduced := Map("2.12" -> "4.7.0", "2.13" -> "4.7.0", "3" -> "4.7.0"))
.dependsOn(core, testkit % Test)
val circeVersion = "0.14.14"
lazy val circe = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("circe"))
.settings(commonSettings: _*)
.settings(
name := "diffson-circe",
libraryDependencies ++= Seq(
"io.circe" %%% "circe-core" % circeVersion,
"io.circe" %%% "circe-parser" % circeVersion
)
)
.nativeSettings(
tlVersionIntroduced := Map("3" -> "4.7.0", "2.13" -> "4.7.0", "2.12" -> "4.7.0")
)
.dependsOn(core, testkit % Test)
val ujsonVersion = "4.4.1"
lazy val ujson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("ujson"))
.settings(commonSettings: _*)
.settings(
name := "diffson-ujson",
libraryDependencies ++= Seq(
"com.lihaoyi" %%% "ujson" % ujsonVersion,
"com.lihaoyi" %%% "upickle" % ujsonVersion
),
tlVersionIntroduced := Map("3" -> "4.6.0", "2.13" -> "4.6.0", "2.12" -> "4.6.0")
)
.nativeSettings(
tlVersionIntroduced := Map("3" -> "4.7.0", "2.13" -> "4.7.0", "2.12" -> "4.7.0")
)
.dependsOn(core, testkit % Test)
lazy val benchmarks = crossProject(JVMPlatform)
.crossType(CrossType.Pure)
.in(file("benchmarks"))
.enablePlugins(NoPublishPlugin, JmhPlugin)
.settings(commonSettings: _*)
.settings(
name := "diffson-benchmarks",
libraryDependencies ++= Seq(
"io.circe" %% "circe-literal" % circeVersion
)
)
.dependsOn(circe)