-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
158 lines (140 loc) · 4.11 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name := "spice"
ThisBuild / organization := "com.outr"
ThisBuild / version := "0.6.1-SNAPSHOT"
val scala213: String = "2.13.15"
val scala3: String = "3.3.4"
ThisBuild / scalaVersion := scala213
ThisBuild / scalacOptions ++= Seq("-deprecation")
ThisBuild / javacOptions ++= Seq("-source", "11", "-target", "11")
ThisBuild / crossScalaVersions := Seq(scala213, scala3)
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
ThisBuild / sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / sonatypeProfileName := "com.outr"
ThisBuild / licenses := Seq("MIT" -> url("https://github.com/outr/spice/blob/master/LICENSE"))
ThisBuild / sonatypeProjectHosting := Some(xerial.sbt.Sonatype.GitHubHosting("outr", "spice", "matt@matthicks.com"))
ThisBuild / homepage := Some(url("https://github.com/outr/spice"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/outr/spice"),
"scm:git@github.com:outr/spice.git"
)
)
ThisBuild / developers := List(
Developer(id="darkfrog", name="Matt Hicks", email="matt@matthicks.com", url=url("https://matthicks.com"))
)
ThisBuild / versionScheme := Some("semver-spec")
ThisBuild / outputStrategy := Some(StdoutOutput)
ThisBuild / Test / testOptions += Tests.Argument("-oDF")
def groupTests(tests: Seq[TestDefinition]): Seq[Tests.Group] = tests.map { test =>
Tests.Group(
name = test.name,
tests = Seq(test),
runPolicy = Tests.SubProcess(ForkOptions())
)
}
def dep: Dependencies.type = Dependencies
lazy val root = project.in(file("."))
.aggregate(
coreJS, coreJVM,
clientJS, clientJVM, clientImplementationOkHttp, clientImplementationJVM,
delta,
server, serverImplementationUndertow,
openAPI
)
.settings(
publish := {},
publishLocal := {}
)
lazy val core = crossProject(JSPlatform, JVMPlatform)
.in(file("core"))
.settings(
name := "spice-core",
description := "Core functionality leveraged and shared by most other sub-projects of Spice.",
libraryDependencies ++= Seq(
dep.profig, dep.scribe, dep.scribeCats, dep.fabricParse, dep.reactify, dep.catsEffect, dep.fs2, dep.fs2IO,
dep.literally, dep.moduload,
dep.scalaTest, dep.catsEffectTesting
)
)
.jsSettings(
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % dep.version.scalaJSDOM
)
)
lazy val coreJS = core.js
lazy val coreJVM = core.jvm
lazy val client = crossProject(JSPlatform, JVMPlatform)
.in(file("client"))
.dependsOn(core)
.settings(
name := "spice-client",
libraryDependencies ++= Seq(
dep.scalaTest, dep.catsEffectTesting
)
)
lazy val clientJS = client.js
lazy val clientJVM = client.jvm
lazy val clientImplementationOkHttp = project
.dependsOn(clientJVM)
.in(file("client/implementation/okhttp"))
.settings(
name := "spice-client-okhttp",
libraryDependencies ++= Seq(
dep.okHttp,
dep.scalaTest, dep.catsEffectTesting
)
)
lazy val clientImplementationJVM = project
.dependsOn(clientJVM)
.in(file("client/implementation/jvm"))
.settings(
name := "spice-client-jvm",
libraryDependencies ++= Seq(
dep.httpMime,
dep.scalaTest, dep.catsEffectTesting
)
)
lazy val delta = project
.dependsOn(coreJVM)
.in(file("delta"))
.settings(
name := "spice-delta",
libraryDependencies ++= Seq(
dep.scalaTest, dep.catsEffectTesting
)
)
lazy val server = project
.dependsOn(coreJVM, delta, clientImplementationJVM % "test->test")
.in(file("server"))
.settings(
name := "spice-server",
Test / testGrouping := groupTests((Test / definedTests).value),
libraryDependencies ++= Seq(
dep.scalaTest, dep.catsEffectTesting
)
)
lazy val serverImplementationUndertow = project
.dependsOn(
server,
clientImplementationJVM % "test->test"
)
.in(file("server/implementation/undertow"))
.settings(
name := "spice-server-undertow",
fork := true,
libraryDependencies ++= Seq(
dep.undertow, dep.scribeSlf4j,
dep.scalaTest, dep.catsEffectTesting
)
)
lazy val openAPI = project
.dependsOn(server, server % "test->test")
.in(file("openapi"))
.settings(
name := "spice-openapi",
fork := true,
libraryDependencies ++= Seq(
dep.scalaTest, dep.catsEffectTesting
)
)