-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
76 lines (67 loc) · 2.27 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
ThisBuild / tlBaseVersion := "0.2"
ThisBuild / organization := "org.polyvariant"
ThisBuild / organizationName := "Polyvariant"
ThisBuild / startYear := Some(2023)
ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers := List(tlGitHubDev("kubukoz", "Jakub Kozłowski"))
ThisBuild / tlSonatypeUseLegacyHost := false
def crossPlugin(x: sbt.librarymanagement.ModuleID) = compilerPlugin(x.cross(CrossVersion.full))
val compilerPlugins = List(
crossPlugin("org.polyvariant" % "better-tostring" % "0.3.17")
)
val Scala213 = "2.13.10"
val Scala3 = "3.3.0"
ThisBuild / scalaVersion := Scala213
ThisBuild / tlFatalWarnings := false
ThisBuild / tlFatalWarningsInCi := false
val commonSettings = Seq(
libraryDependencies ++= compilerPlugins
)
lazy val core = projectMatrix
.in(file("modules/core"))
.settings(
name := "smithy4s-caliban",
commonSettings,
libraryDependencies ++= Seq(
"com.github.ghostdogpr" %%% "caliban-cats" % "2.2.1",
"com.disneystreaming.smithy4s" %%% "smithy4s-core" % smithy4s.codegen.BuildInfo.version,
"com.disneystreaming" %%% "weaver-cats" % "0.8.3" % Test,
"io.circe" %% "circe-core" % "0.14.5" % Test,
),
testFrameworks += new TestFramework("weaver.framework.CatsEffect"),
Smithy4sCodegenPlugin.defaultSettings(Test),
scalacOptions --= {
if (scalaVersion.value.startsWith("3"))
Seq("-Ykind-projector:underscores")
else
Seq()
},
scalacOptions ++= {
if (scalaVersion.value.startsWith("3"))
Seq("-Ykind-projector")
else
Seq()
},
)
.jvmPlatform(Seq(Scala213, Scala3))
lazy val docs = projectMatrix
.in(file("modules/docs"))
.settings(
mdocIn := new File("README.md"),
libraryDependencies ++= Seq(
"org.http4s" %%% "http4s-ember-server" % "0.23.19",
"com.github.ghostdogpr" %%% "caliban-http4s" % "2.2.1",
"com.softwaremill.sttp.tapir" %%% "tapir-json-circe" % "1.5.0",
),
ThisBuild / githubWorkflowBuild +=
WorkflowStep.Sbt(
List("docs/mdoc")
),
)
.dependsOn(core)
.jvmPlatform(Seq(Scala213))
.enablePlugins(MdocPlugin, Smithy4sCodegenPlugin)
lazy val root = project
.in(file("."))
.aggregate(core.componentProjects.map(p => p: ProjectReference): _*)
.enablePlugins(NoPublishPlugin)