This repository has been archived by the owner on Sep 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
57 lines (52 loc) · 2.09 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
ThisBuild / organization := "com.47deg"
ThisBuild / scalaVersion := "2.13.3"
ThisBuild / skip in publish := true
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/47degrees/petstore4s"),
"scm:git:https://github.com/47degrees/petstore4s.git",
Some("scm:git:[email protected]:47degrees/petstore4s.git")
)
)
addCommandAlias("ci-test", "scalafmtCheckAll; scalafmtSbtCheck; test")
addCommandAlias("ci-docs", "github; mdoc")
addCommandAlias("ci-publish", "compile")
lazy val protocol = project
.settings(
muSrcGenIdlType := higherkindness.mu.rpc.srcgen.Model.IdlType.OpenAPI,
muSrcGenSourceDirs := Seq((Compile / resourceDirectory).value),
muSrcGenIdlTargetDir := (Compile / sourceManaged).value / "compiled_openapi",
sourceGenerators in Compile += (Compile / muSrcGen).taskValue,
muSrcGenOpenApiHttpImpl := higherkindness.mu.rpc.srcgen.openapi.OpenApiSrcGenerator.HttpImpl.Http4sV20,
addCompilerPlugin("com.github.ghik" % "silencer-plugin" % "1.7.6" cross CrossVersion.full),
scalacOptions += "-P:silencer:pathFilters=src_managed",
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % "0.14.1",
"io.circe" %% "circe-generic" % "0.14.1",
"org.http4s" %% "http4s-blaze-client" % "0.21.3",
"org.http4s" %% "http4s-circe" % "0.21.3"
)
)
.enablePlugins(SrcGenPlugin)
lazy val server = project
.dependsOn(protocol)
.settings(
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-blaze-server" % "0.21.3",
"org.http4s" %% "http4s-dsl" % "0.21.3",
"ch.qos.logback" % "logback-classic" % "1.2.6"
)
)
lazy val `client-example` = project
.dependsOn(protocol, server % "test->test")
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "log4cats-slf4j" % "1.2.0",
"ch.qos.logback" % "logback-classic" % "1.2.6",
"org.scalactic" %% "scalactic" % "3.2.9" % Test,
"org.scalatest" %% "scalatest" % "3.2.9" % Test
)
)
lazy val documentation = project
.settings(mdocOut := file("."))
.enablePlugins(MdocPlugin)