-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.sbt
142 lines (130 loc) · 6.16 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
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.15"
inThisBuild(
Seq(
startYear := Some(2020),
Test / fork := true,
developers := List(
// your GitHub handle and name
tlGitHubDev("hamnis", "Erlend Hamnaberg")
),
licenses := Seq(License.Apache2),
tlBaseVersion := "0.5",
tlSonatypeUseLegacyHost := false,
crossScalaVersions := Seq(Scala213, Scala212, "3.3.4"),
ThisBuild / scalaVersion := Scala213,
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
)
)
val http4sVersion = "0.23.29"
val jetty = "12.0.15"
val netty = "4.1.115.Final"
val munit = "1.0.2"
val munitScalaCheck = "1.0.0"
val io_uring = "0.0.25.Final"
val nativeNettyModules =
Seq(
"io.netty" % "netty-transport-classes-epoll" % netty,
"io.netty" % "netty-transport-classes-kqueue" % netty,
"io.netty.incubator" % "netty-incubator-transport-classes-io_uring" % io_uring,
("io.netty" % "netty-transport-native-epoll" % netty).classifier("linux-x86_64") % Runtime,
("io.netty" % "netty-transport-native-epoll" % netty).classifier("linux-aarch_64") % Runtime,
("io.netty" % "netty-transport-native-kqueue" % netty).classifier("osx-x86_64") % Runtime,
("io.netty" % "netty-transport-native-kqueue" % netty).classifier("osx-aarch_64") % Runtime,
("io.netty.incubator" % "netty-incubator-transport-native-io_uring" % io_uring)
.classifier("linux-x86_64") % Runtime
)
lazy val core = project
.settings(CommonSettings.settings)
.settings(
name := "http4s-netty-core",
libraryDependencies ++= List(
"co.fs2" %% "fs2-reactive-streams" % "3.11.0",
("com.typesafe.netty" % "netty-reactive-streams-http" % "2.0.13")
.exclude("io.netty", "netty-codec-http")
.exclude("io.netty", "netty-handler"),
"io.netty" % "netty-codec-http" % netty,
"io.netty" % "netty-handler" % netty,
"org.http4s" %% "http4s-core" % http4sVersion,
"org.typelevel" %% "cats-effect" % "3.5.7"
)
)
lazy val server = project
.dependsOn(core, client % "compile->test")
.settings(CommonSettings.settings)
.settings(
name := "http4s-netty-server",
libraryDependencies ++= List(
"io.netty" % "netty-codec-http2" % netty,
"org.eclipse.jetty" % "jetty-client" % jetty % Test,
"org.eclipse.jetty.http2" % "jetty-http2-client" % jetty % Test,
"org.eclipse.jetty.http2" % "jetty-http2-client-transport" % jetty % Test,
"org.http4s" %% "http4s-server" % http4sVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion % Test,
"ch.qos.logback" % "logback-classic" % "1.4.5" % Test,
"org.scalameta" %% "munit" % munit % Test,
"org.scalameta" %% "munit-scalacheck" % munitScalaCheck % Test,
"org.http4s" %% "http4s-circe" % http4sVersion % Test,
"org.http4s" %% "http4s-jdk-http-client" % "0.9.2" % Test,
"org.typelevel" %% "munit-cats-effect" % "2.0.0" % Test
),
libraryDependencySchemes += "org.typelevel" %% "munit-cats-effect" % VersionScheme.Always, // "early-semver",
libraryDependencies ++= nativeNettyModules,
mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[IncompatibleResultTypeProblem](
"org.http4s.netty.server.ServerNettyModelConversion.toNettyResponseWithWebsocket"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"org.http4s.netty.server.ServerNettyModelConversion.this"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"org.http4s.netty.server.NegotiationHandler#Config.copy"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"org.http4s.netty.server.NegotiationHandler#Config.this"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"org.http4s.netty.server.NegotiationHandler#Config.apply"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"org.http4s.netty.server.NettyServerBuilder.this"),
ProblemFilters.exclude[MissingTypesProblem](
"org.http4s.netty.server.NegotiationHandler$Config$")
)
)
lazy val client = project
.dependsOn(core)
.settings(CommonSettings.settings)
.settings(
name := "http4s-netty-client",
libraryDependencies ++= List(
"org.http4s" %% "http4s-client" % http4sVersion,
"io.netty" % "netty-codec-http2" % netty,
"io.netty" % "netty-handler-proxy" % netty,
"org.http4s" %% "http4s-client-testkit" % http4sVersion % Test,
"org.http4s" %% "http4s-ember-server" % http4sVersion % Test,
"org.http4s" %% "http4s-dsl" % http4sVersion % Test,
"org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2" % Test,
("com.github.monkeywie" % "proxyee" % "1.7.6" % Test)
.excludeAll("io.netty")
.excludeAll("org.bouncycastle"),
"com.github.bbottema" % "java-socks-proxy-server" % "4.1.2" % Test,
"org.scalameta" %% "munit" % munit % Test,
"ch.qos.logback" % "logback-classic" % "1.2.13" % Test,
"org.typelevel" %% "munit-cats-effect" % "2.0.0" % Test
),
libraryDependencySchemes += "org.typelevel" %% "munit-cats-effect" % VersionScheme.Always, // "early-semver",
libraryDependencies ++= nativeNettyModules,
mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[Problem]("org.http4s.netty.client.Http4sChannelPoolMap"),
ProblemFilters.exclude[Problem]("org.http4s.netty.client.NettyClientBuilder$*"),
ProblemFilters.exclude[Problem]("org.http4s.netty.client.Http4sChannelPoolMap#*"),
ProblemFilters.exclude[Problem]("org.http4s.netty.client.Http4sChannelPoolMap.*"),
ProblemFilters.exclude[Problem]("org.http4s.netty.client.NettyClientBuilder.*"),
ProblemFilters.exclude[Problem]("org.http4s.netty.client.NettyWSClientBuilder.*"),
ProblemFilters.exclude[MissingTypesProblem](
"org.http4s.netty.client.Http4sChannelPoolMap$Config$"),
ProblemFilters.exclude[MissingFieldProblem](
"org.http4s.netty.client.NettyClientBuilder.SSLContextOption"),
ProblemFilters.exclude[MissingClassProblem]("org.http4s.netty.client.Http4sHandler$"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"org.http4s.netty.client.Http4sWebsocketHandler#Conn.this")
)
)
lazy val root = tlCrossRootProject.aggregate(core, client, server)