forked from http4s/http4s-fs2-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
132 lines (121 loc) · 4.98 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
ThisBuild / tlBaseVersion := "0.3"
ThisBuild / tlJdkRelease := Some(11)
// exclude Java 8 from CI as fs2-data doesn't support it
ThisBuild / githubWorkflowJavaVersions -= JavaSpec.temurin("8")
ThisBuild / developers := List(
tlGitHubDev("rossabaker", "Ross A. Baker"),
tlGitHubDev("ybasket", "Yannick Heiber"),
)
val Scala213 = "2.13.12"
ThisBuild / crossScalaVersions := Seq("2.12.18", Scala213, "3.3.1")
ThisBuild / scalaVersion := Scala213
// ensure missing timezones don't break tests on JS
ThisBuild / jsEnv := {
import org.scalajs.jsenv.nodejs.NodeJSEnv
new NodeJSEnv(NodeJSEnv.Config().withEnv(Map("TZ" -> "UTC")))
}
// ensure we don't fail compilation – package objects with inheritance are used in http4s/http4s as well,
// better to stay style-consistent for now
ThisBuild / scalacOptions += "-Wconf:msg=package object inheritance is deprecated:s"
lazy val root = tlCrossRootProject.aggregate(xml, xmlScala, csv, cbor, json)
val http4sVersion = "0.23.26"
val scalaXmlVersion = "2.2.0"
val fs2Version = "3.9.4"
val fs2DataVersion = "1.10.0"
val munitVersion = "1.0.0-M10"
val munitCatsEffectVersion = "2.0.0-M4"
lazy val xml = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("xml"))
.settings(
name := "http4s-fs2-data-xml",
description := "Provides xml codecs for http4s via fs2-data",
startYear := Some(2022),
libraryDependencies ++= Seq(
"co.fs2" %%% "fs2-core" % fs2Version,
"org.http4s" %%% "http4s-core" % http4sVersion,
"org.gnieh" %%% "fs2-data-xml" % fs2DataVersion,
"org.scalameta" %%% "munit-scalacheck" % munitVersion % Test,
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectVersion % Test,
"org.http4s" %%% "http4s-laws" % http4sVersion % Test,
),
)
lazy val xmlScala = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("xml-scala"))
.dependsOn(xml)
.settings(
name := "http4s-fs2-data-xml-scala",
description := "Provides scala-xml codecs for http4s via fs2-data",
startYear := Some(2022),
libraryDependencies ++= Seq(
"org.http4s" %%% "http4s-core" % http4sVersion,
"org.scala-lang.modules" %%% "scala-xml" % scalaXmlVersion,
"org.gnieh" %%% "fs2-data-xml-scala" % fs2DataVersion,
"org.scalameta" %%% "munit-scalacheck" % munitVersion % Test,
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectVersion % Test,
// "org.typelevel" %%% "scalacheck-xml" % "0.1.0" % Test,
"org.http4s" %%% "http4s-laws" % http4sVersion % Test,
),
)
lazy val csv = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("csv"))
.settings(
name := "http4s-fs2-data-csv",
description := "Provides csv codecs for http4s via fs2-data",
startYear := Some(2023),
libraryDependencies ++= Seq(
"co.fs2" %%% "fs2-core" % fs2Version,
"org.http4s" %%% "http4s-core" % http4sVersion,
"org.gnieh" %%% "fs2-data-csv" % fs2DataVersion,
"org.gnieh" %%% "fs2-data-csv-generic" % fs2DataVersion % Test,
"org.scalameta" %%% "munit-scalacheck" % munitVersion % Test,
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectVersion % Test,
"org.http4s" %%% "http4s-laws" % http4sVersion % Test,
),
)
lazy val cbor = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("cbor"))
.settings(
name := "http4s-fs2-data-cbor",
description := "Provides CBOR codecs for http4s via fs2-data",
startYear := Some(2023),
libraryDependencies ++= Seq(
"co.fs2" %%% "fs2-core" % fs2Version,
"org.http4s" %%% "http4s-core" % http4sVersion,
"org.gnieh" %%% "fs2-data-cbor" % fs2DataVersion,
"org.scalameta" %%% "munit-scalacheck" % munitVersion % Test,
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectVersion % Test,
"org.http4s" %%% "http4s-laws" % http4sVersion % Test,
),
)
lazy val json = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("json"))
.settings(
name := "http4s-fs2-data-json",
description := "Provides JSON codecs for http4s via fs2-data",
startYear := Some(2024),
libraryDependencies ++= Seq(
"co.fs2" %%% "fs2-core" % fs2Version,
"org.http4s" %%% "http4s-core" % http4sVersion,
"org.gnieh" %%% "fs2-data-json" % fs2DataVersion,
"org.scalameta" %%% "munit-scalacheck" % munitVersion % Test,
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectVersion % Test,
"org.http4s" %%% "http4s-laws" % http4sVersion % Test,
),
)
lazy val docs = project
.in(file("site"))
.dependsOn(xml.jvm, xmlScala.jvm, csv.jvm, cbor.jvm, json.jvm)
.settings(
libraryDependencies ++= Seq(
"io.circe" %%% "circe-generic" % "0.14.5",
"org.http4s" %%% "http4s-dsl" % http4sVersion,
"org.http4s" %%% "http4s-circe" % http4sVersion,
"org.gnieh" %%% "fs2-data-csv-generic" % fs2DataVersion,
)
)
.enablePlugins(Http4sOrgSitePlugin)