-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.sbt
132 lines (118 loc) · 3.4 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
126
127
128
129
130
131
132
import Dependencies.*
import ReleaseTransformations.*
import scala.collection.Seq
val Scala213 = "2.13.14"
val Scala212 = "2.12.19"
val Scala3 = "3.3.3"
val commonSettings = Seq(
homepage := Some(url("https://github.com/evolution-gaming/play-json-tools")),
publishTo := Some(Resolver.evolutionReleases),
organizationName := "Evolution",
organizationHomepage := Some(url("https://evolution.com")),
releaseCrossBuild := true,
organization := "com.evolution",
licenses := Seq(("MIT", url("https://opensource.org/licenses/MIT"))),
description := "Set of implicit helper classes for transforming various objects to and from JSON",
startYear := Some(2017),
scalaVersion := Scala213,
crossScalaVersions := Seq(scalaVersion.value, Scala212, Scala3),
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v >= 13 =>
List(
"-Xsource:3",
)
case _ =>
Nil
}
},
)
val alias: Seq[sbt.Def.Setting[?]] =
// addCommandAlias("check", "all versionPolicyCheck Compile/doc") ++
addCommandAlias("check", "show version") ++
addCommandAlias("build", "+all compile test")
lazy val root = project
.in(file("."))
.disablePlugins(MimaPlugin)
.settings(alias)
.settings(
commonSettings,
publish / skip := true,
crossScalaVersions := Nil,
/* Support uneven cross scala versions in sub-projects.
* See https://www.scala-sbt.org/1.x/docs/Cross-Build.html#Note+about+sbt-release
*/
releaseCrossBuild := false,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
releaseStepCommandAndRemaining("+test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publish"),
setNextVersion,
commitNextVersion,
pushChanges
)
)
.aggregate(
`play-json-tools`,
`play-json-genericJVM`,
`play-json-genericJS`,
`play-json-jsoniterJVM`,
`play-json-jsoniterJS`,
`play-json-circe`
)
lazy val `play-json-genericJVM` = `play-json-generic`.jvm
lazy val `play-json-genericJS` = `play-json-generic`.js
lazy val `play-json-generic` = crossProject(JVMPlatform, JSPlatform)
.crossType(CrossType.Pure)
.settings(
commonSettings,
crossScalaVersions -= Scala3,
scalacOptsFailOnWarn := Some(false),
libraryDependencies ++= Seq(
shapeless,
playJson,
scalaTest % Test
).map(excludeLog4j),
)
lazy val `play-json-tools` = project
.settings(
commonSettings,
libraryDependencies ++= Seq(
playJson,
nel,
scalaTest % Test
).map(excludeLog4j)
)
lazy val `play-json-jsoniterJVM` = `play-json-jsoniter`.jvm
lazy val `play-json-jsoniterJS` = `play-json-jsoniter`.js
lazy val `play-json-jsoniter` = crossProject(JVMPlatform, JSPlatform)
.crossType(CrossType.Full)
.settings(
commonSettings,
libraryDependencies ++= (Seq(
playJson,
jsoniter,
collectionCompact,
scalaTest % Test
) ++ (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v >= 13 =>
Seq(jsonGenerator % Test)
case _ =>
Seq()
})).map(excludeLog4j)
)
lazy val `play-json-circe` = project
.settings(
commonSettings,
libraryDependencies ++= Seq(
playJson,
circe.core,
circe.parser,
scalaTest % Test
).map(excludeLog4j)
)