-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.sbt
128 lines (119 loc) · 4.72 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
import sbt.Keys.{libraryDependencies, sourceManaged}
import sbtprotoc.ProtocPlugin.autoImport.PB
ThisBuild / tlBaseVersion := "0.5"
ThisBuild / developers := List(
Developer(
"ikhoon",
"Ikhun Um",
url("https://github.com/ikhoon")
)
)
ThisBuild / crossScalaVersions := Seq("2.13.15", "2.12.20", "3.3.4")
ThisBuild / scalaVersion := crossScalaVersions.value.head
ThisBuild / tlVersionIntroduced := Map("3" -> "0.5.0")
ThisBuild / tlCiReleaseBranches := Seq("main")
ThisBuild / homepage := Some(url("https://github.com/http4s/http4s-armeria"))
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
ThisBuild / startYear := Some(2020)
ThisBuild / resolvers += Resolver.mavenLocal
ThisBuild / Test / javaOptions += "-Dcom.linecorp.armeria.verboseResponses=true -Dcom.linecorp.armeria.verboseExceptions=always"
val versions = new {
val armeria = "1.31.1"
val fs2 = "3.11.0"
val http4s = "0.23.29"
val logback = "1.2.13"
val micrometer = "1.9.2"
val munit = "1.0.2"
val catsEffectMunit = "2.0.0"
}
val munit = Seq(
"org.scalameta" %% "munit" % versions.munit % Test,
"org.typelevel" %% "munit-cats-effect" % versions.catsEffectMunit % Test
)
lazy val root = project
.in(file("."))
.enablePlugins(NoPublishPlugin)
.settings(
// Root project
name := "http4s-armeria",
description := " Armeria backend for http4s"
)
.aggregate(server, client)
lazy val server = project
.settings(
name := "http4s-armeria-server",
libraryDependencies ++= List(
"com.linecorp.armeria" % "armeria" % versions.armeria,
"co.fs2" %% "fs2-reactive-streams" % versions.fs2,
"org.http4s" %% "http4s-server" % versions.http4s,
"ch.qos.logback" % "logback-classic" % versions.logback % Test,
"org.http4s" %% "http4s-dsl" % versions.http4s % Test
) ++ munit
)
lazy val client = project
.settings(
name := "http4s-armeria-client",
libraryDependencies ++= List(
"com.linecorp.armeria" % "armeria" % versions.armeria,
"co.fs2" %% "fs2-reactive-streams" % versions.fs2,
"org.http4s" %% "http4s-client" % versions.http4s,
"ch.qos.logback" % "logback-classic" % versions.logback % Test
) ++ munit
)
lazy val exampleArmeriaHttp4s = project
.in(file("examples/armeria-http4s"))
.settings(
name := "examples-armeria-http4s",
crossScalaVersions := Seq("2.13.15", "2.12.20"),
scalaVersion := crossScalaVersions.value.head,
libraryDependencies ++= List(
"ch.qos.logback" % "logback-classic" % versions.logback % Runtime,
"io.micrometer" % "micrometer-registry-prometheus" % versions.micrometer,
"org.http4s" %% "http4s-dsl" % versions.http4s
),
headerSources / excludeFilter := AllPassFilter
)
.enablePlugins(NoPublishPlugin)
.dependsOn(server)
lazy val exampleArmeriaScalaPB = project
.in(file("examples/armeria-scalapb"))
.settings(
name := "examples-armeria-scalapb",
crossScalaVersions := Seq("2.13.15", "2.12.20"),
scalaVersion := crossScalaVersions.value.head,
libraryDependencies ++= List(
"ch.qos.logback" % "logback-classic" % versions.logback % Runtime,
"com.linecorp.armeria" % "armeria-grpc" % versions.armeria,
"com.linecorp.armeria" %% "armeria-scalapb" % versions.armeria,
"org.http4s" %% "http4s-dsl" % versions.http4s,
"com.thesamet.scalapb.common-protos" %% "proto-google-common-protos-scalapb_0.11" % "2.5.0-3" % "protobuf",
"com.thesamet.scalapb.common-protos" %% "proto-google-common-protos-scalapb_0.11" % "2.5.0-3"
) ++ munit,
Compile / PB.targets := Seq(
scalapb.gen() -> (Compile / sourceManaged).value,
scalapb.reactor.ReactorCodeGenerator -> (Compile / sourceManaged).value
),
headerSources / excludeFilter := AllPassFilter,
unusedCompileDependenciesTest := {}
)
.enablePlugins(NoPublishPlugin)
.dependsOn(server)
lazy val exampleArmeriaFs2Grpc = project
.in(file("examples/armeria-fs2grpc"))
.settings(
name := "examples-armeria-fs2grpc",
crossScalaVersions := Seq("2.13.15", "2.12.20"),
scalaVersion := crossScalaVersions.value.head,
libraryDependencies ++= List(
"ch.qos.logback" % "logback-classic" % versions.logback % Runtime,
"com.linecorp.armeria" % "armeria-grpc" % versions.armeria,
"com.linecorp.armeria" %% "armeria-scalapb" % versions.armeria,
"org.http4s" %% "http4s-dsl" % versions.http4s,
"com.thesamet.scalapb.common-protos" %% "proto-google-common-protos-scalapb_0.11" % "2.5.0-3" % "protobuf",
"com.thesamet.scalapb.common-protos" %% "proto-google-common-protos-scalapb_0.11" % "2.5.0-3"
) ++ munit,
headerSources / excludeFilter := AllPassFilter
)
.enablePlugins(NoPublishPlugin, Fs2Grpc)
.dependsOn(server)