-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
174 lines (160 loc) · 5.6 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
import com.typesafe.sbt.site.util.SiteHelpers
/*
* Copyright (c) 2023-present Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Snowplow Community License Version 1.0,
* and you may not use this file except in compliance with the Snowplow Community License Version 1.0.
* You may obtain a copy of the Snowplow Community License Version 1.0 at https://docs.snowplow.io/community-license-1.0
*/
lazy val root = project
.in(file("."))
.aggregate(
streams,
kinesis,
kafka,
pubsub,
runtimeCommon,
loadersCommon,
IT
)
lazy val streams: Project = project
.settings(
name := "streams-core"
)
.withId("streams-core")
.in(file("modules/streams-core"))
.enablePlugins(SiteScaladocPlugin, PreprocessPlugin, SitePreviewPlugin)
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.mimaSettings)
.settings(BuildSettings.docsSettings)
.settings(
previewFixedPort := Some(9995),
Preprocess / preprocessVars := Map("VERSION" -> version.value)
)
.settings(libraryDependencies ++= Dependencies.streamsDependencies)
lazy val kinesis: Project = project
.in(file("modules/kinesis"))
.enablePlugins(SiteScaladocPlugin, PreprocessPlugin, SitePreviewPlugin)
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.mimaSettings)
.settings(BuildSettings.docsSettings)
.settings(
previewFixedPort := Some(9996),
Preprocess / preprocessVars := Map("VERSION" -> version.value)
)
.settings(libraryDependencies ++= Dependencies.kinesisDependencies)
.dependsOn(streams)
lazy val IT: Project = project
.settings(
name := "it"
)
.withId("it")
.in(file("modules/it"))
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.mimaSettings)
.dependsOn(kinesis)
.dependsOn(runtimeCommon)
.settings(
publish / skip := true,
publishLocal / skip := true,
Test / javaOptions ++= Seq("-Daws.region=eu-central-1", "-Daws.accessKeyId=test", "-Daws.secretAccessKey=test"),
libraryDependencies ++= Dependencies.kinesisItDependencies
)
lazy val kafka: Project = project
.in(file("modules/kafka"))
.enablePlugins(SiteScaladocPlugin, PreprocessPlugin, SitePreviewPlugin)
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.mimaSettings)
.settings(BuildSettings.docsSettings)
.settings(
previewFixedPort := Some(9997),
Preprocess / preprocessVars := Map("VERSION" -> version.value)
)
.settings(libraryDependencies ++= Dependencies.kafkaDependencies)
.dependsOn(streams)
lazy val pubsub: Project = project
.in(file("modules/pubsub"))
.enablePlugins(SiteScaladocPlugin, PreprocessPlugin, SitePreviewPlugin)
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.mimaSettings)
.settings(BuildSettings.docsSettings)
.settings(
previewFixedPort := Some(9998),
Preprocess / preprocessVars := Map("VERSION" -> version.value)
)
.settings(libraryDependencies ++= Dependencies.pubsubDependencies)
.dependsOn(streams)
lazy val runtimeCommon: Project = project
.settings(
name := "runtime-common"
)
.withId("runtime-common")
.in(file("modules/runtime-common"))
.enablePlugins(SiteScaladocPlugin, PreprocessPlugin, SitePreviewPlugin)
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.mimaSettings)
.settings(BuildSettings.docsSettings)
.settings(BuildSettings.igluTestSettings)
.settings(
previewFixedPort := Some(9994),
Preprocess / preprocessVars := Map("VERSION" -> version.value)
)
.settings(libraryDependencies ++= Dependencies.runtimeCommonDependencies)
lazy val loadersCommon: Project = project
.settings(
name := "loaders-common"
)
.withId("loaders-common")
.in(file("modules/loaders-common"))
.enablePlugins(SiteScaladocPlugin, PreprocessPlugin, SitePreviewPlugin)
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.mimaSettings)
.settings(BuildSettings.docsSettings)
.settings(BuildSettings.igluTestSettings)
.settings(
previewFixedPort := Some(9999),
Preprocess / preprocessVars := Map("VERSION" -> version.value)
)
.settings(libraryDependencies ++= Dependencies.loadersCommonDependencies)
// docs
val StreamsCore = config("streams-core")
val Kinesis = config("kinesis")
val Kafka = config("kafka")
val PubSub = config("pubsub")
val RuntimeCommon = config("runtime-common")
val LoadersCommon = config("loaders-common")
lazy val scaladocSiteProjects: List[(Project, sbt.Configuration)] = List(
(streams, StreamsCore),
(kinesis, Kinesis),
(kafka, Kafka),
(pubsub, PubSub),
(runtimeCommon, RuntimeCommon),
(loadersCommon, LoadersCommon)
)
lazy val scaladocSiteSettings = scaladocSiteProjects.flatMap { case (project, conf) =>
inConfig(conf)(
Seq(
siteSubdirName := s"${project.id}/${version.value}",
mappings := (project / Compile / packageDoc / mappings).value
)
) ++
SiteHelpers.addMappingsToSiteDir(conf / mappings, conf / siteSubdirName)
}
lazy val docs = project
.in(file("docs"))
.enablePlugins(SiteScaladocPlugin, PreprocessPlugin, SitePreviewPlugin, GhpagesPlugin)
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.ghPagesSettings)
.settings(
publish / skip := true,
publishLocal / skip := true,
Preprocess / preprocessVars := Map("VERSION" -> version.value)
)
.settings(scaladocSiteSettings)