-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.sbt
125 lines (111 loc) · 3.32 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
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
import Tests.*
val scala213 = "2.13.13"
val scala3 = "3.3.3"
name := "scarango"
ThisBuild / organization := "com.outr"
ThisBuild / version := "3.20.0"
ThisBuild / scalaVersion := scala213
ThisBuild / crossScalaVersions := List(scala3, scala213)
ThisBuild / scalacOptions ++= Seq("-unchecked", "-deprecation")
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/scarango/blob/master/LICENSE"))
ThisBuild / sonatypeProjectHosting := Some(xerial.sbt.Sonatype.GitHubHosting("outr", "scarango", "[email protected]"))
ThisBuild / homepage := Some(url("https://github.com/outr/scarango"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/outr/scarango"),
"scm:[email protected]:outr/scarango.git"
)
)
ThisBuild / versionScheme := Some("pvp")
ThisBuild / developers := List(
Developer(id="darkfrog", name="Matt Hicks", email="[email protected]", url=url("https://matthicks.com"))
)
def dep: Dependencies.type = Dependencies
def groupByName(tests: Seq[TestDefinition]): Seq[Group] = {
tests.groupBy(_.name).map {
case (n, t) =>
val options = ForkOptions()
Group(n, t, SubProcess(options))
}.toSeq
}
lazy val root = project.in(file("."))
.aggregate(coreJS, coreJVM, driver, monitor, docs) // example, generator
.settings(
publish := {},
publishLocal := {}
)
lazy val core = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("core"))
.settings(
name := "scarango-core",
libraryDependencies ++= Seq(
dep.profig,
dep.fabric,
dep.scalaPass,
dep.scalaTest
)
)
lazy val coreJS = core.js
lazy val coreJVM = core.jvm
lazy val driver = project.in(file("driver"))
.settings(
name := "scarango-driver",
fork := true,
Test / testGrouping := groupByName((Test / definedTests).value),
Test / testOptions += Tests.Argument("-oF"),
Test / parallelExecution := false,
libraryDependencies ++= Seq(
dep.arangoDBJavaDriver,
dep.jacksonDataformatVelocypack,
dep.catsEffect,
dep.fs2,
dep.scribeSlf4j,
dep.scalaTest,
dep.catsEffectTesting
)
)
.dependsOn(coreJVM)
lazy val monitor = project.in(file("monitor"))
.settings(
name := "scarango-monitor",
fork := true,
Test / testGrouping := groupByName((Test / definedTests).value),
Test / testOptions += Tests.Argument("-oF"),
Test / parallelExecution := false,
libraryDependencies ++= Seq(
dep.spiceClient,
dep.scalaTest,
dep.catsEffectTesting
)
)
.dependsOn(driver)
lazy val generator = project.in(file("generator"))
.settings(
name := "scarango-generator",
fork := true,
libraryDependencies ++= Seq(
dep.scribe,
dep.scalaMeta
)
)
lazy val docs = project
.in(file("documentation"))
.dependsOn(driver)
.enablePlugins(MdocPlugin)
.settings(
mdocVariables := Map(
"VERSION" -> version.value
),
mdocOut := file(".")
)
lazy val example = project.in(file("example"))
.settings(
name := "scarango-example"
)
.dependsOn(driver)