-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
149 lines (138 loc) · 4.31 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
addCommandAlias("codeFmt", ";headerCreate;scalafmtAll;scalafmtSbt;scalafixAll")
addCommandAlias("codeVerify", ";scalafmtCheckAll;scalafmtSbtCheck;scalafixAll --check;headerCheck")
ThisBuild / resolvers += "Akka library repository".at("https://repo.akka.io/maven")
lazy val commonSettings = Seq(
organization := "com.firstbird",
organizationName := "Firstbird GmbH",
sonatypeProfileName := "com.firstbird",
homepage := Some(url("https://github.com/firstbirdtech/backbone")),
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
startYear := Some(2016),
scmInfo := Some(
ScmInfo(homepage.value.get, "scm:git:https://github.com/firstbirdtech/backbone.git")
),
developers += Developer(
"contributors",
"Contributors",
url("https://github.com/firstbirdtech/backbone/graphs/contributors")
),
scalaVersion := "2.13.15",
crossScalaVersions := Seq("2.13.15", "3.3.4"),
scalacOptions ++= {
Seq(
"-deprecation",
"-encoding",
"utf-8",
"-explaintypes",
"-feature",
"-language:higherKinds",
"-unchecked",
"-Xfatal-warnings",
"-Wunused:imports"
) ++
(CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Seq(
"unchecked",
"-source:3.0-migration",
"-explain"
)
case _ =>
Seq(
"-Xsource:3",
"-Wdead-code",
"-Xcheckinit"
)
})
},
javacOptions ++= Seq(
"-Xlint:unchecked",
"-Xlint:deprecation"
),
// show full stack traces and test case durations
Test / testOptions += Tests.Argument("-oDF"),
Test / parallelExecution := false,
headerLicense := Some(HeaderLicense.MIT("2025", "Backbone contributors")),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
lazy val backbone = project
.in(file("."))
.settings(commonSettings)
.settings(publish / skip := true)
.aggregate(core, consumer, publisher, playJson, circe, gson, testutils, integrationtest)
lazy val core = project
.in(file("core"))
.settings(commonSettings)
.settings(
name := "backbone-core",
libraryDependencies ++= Dependencies.core,
dependencyOverrides ++= Dependencies.dependencyOverrides
)
.dependsOn(consumer, publisher, testutils % Test)
lazy val consumer = project
.in(file("consumer"))
.settings(commonSettings)
.settings(
name := "backbone-consumer",
libraryDependencies ++= Dependencies.consumer,
dependencyOverrides ++= Dependencies.dependencyOverrides
)
.dependsOn(testutils % Test)
lazy val publisher = project
.in(file("publisher"))
.settings(commonSettings)
.settings(
name := "backbone-publisher",
libraryDependencies ++= Dependencies.publisher,
dependencyOverrides ++= Dependencies.dependencyOverrides
)
.dependsOn(testutils % Test)
lazy val playJson = project
.in(file("playJson"))
.settings(commonSettings)
.settings(
name := "backbone-play-json",
libraryDependencies ++= Dependencies.jsonPlay,
dependencyOverrides ++= Dependencies.dependencyOverrides
)
.dependsOn(consumer)
lazy val circe = project
.in(file("circe"))
.settings(commonSettings)
.settings(
name := "backbone-circe",
libraryDependencies ++= Dependencies.jsonCirce,
dependencyOverrides ++= Dependencies.dependencyOverrides
)
.dependsOn(consumer)
lazy val gson = project
.in(file("gson"))
.settings(commonSettings)
.settings(
name := "backbone-gson",
libraryDependencies ++= Dependencies.jsonGson,
dependencyOverrides ++= Dependencies.dependencyOverrides
)
.dependsOn(consumer)
lazy val testutils = project
.in(file("testutils"))
.settings(commonSettings)
.settings(
name := "backbone-testutils",
libraryDependencies ++= Dependencies.testutils,
dependencyOverrides ++= Dependencies.dependencyOverrides,
publish / skip := true
)
lazy val integrationtest = project
.in(file("integration-test"))
.settings(commonSettings)
.settings(
name := "backbone-integration-test",
libraryDependencies ++= Dependencies.integrationtest,
dependencyOverrides ++= Dependencies.dependencyOverrides,
run / fork := true,
publish / skip := true
)
.dependsOn(core, circe, consumer, publisher)