-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathbuild.sbt
More file actions
545 lines (518 loc) · 23.6 KB
/
build.sbt
File metadata and controls
545 lines (518 loc) · 23.6 KB
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
import Dependencies.*
import scalajsbundler.util.JSON._
import QuineSettings.*
ThisBuild / resolvers += "thatDot maven" at "https://s3.us-west-2.amazonaws.com/com.thatdot.dependencies/release/"
ThisBuild / scalaVersion := scalaV
addCommandAlias("fmtall", "; scalafmtAll; scalafmtSbt")
addCommandAlias("fixall", "; scalafixAll; fmtall")
ThisBuild / evictionErrorLevel := Level.Info
Global / concurrentRestrictions := Seq(
Tags.limit(Tags.Test, 1),
)
// Core streaming graph interpreter
lazy val `quine-core`: Project = project
.settings(commonSettings)
.dependsOn(`quine-language`)
.settings(
libraryDependencies ++= Seq(
"org.graalvm.js" % "js" % graalV,
"com.chuusai" %% "shapeless" % shapelessV,
"org.apache.pekko" %% "pekko-actor" % pekkoV,
"org.apache.pekko" %% "pekko-stream" % pekkoV,
"org.apache.pekko" %% "pekko-slf4j" % pekkoV,
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingV,
"io.dropwizard.metrics" % "metrics-core" % dropwizardMetricsV,
"io.circe" %% "circe-parser" % circeV,
"org.msgpack" % "msgpack-core" % msgPackV,
"org.apache.commons" % "commons-text" % commonsTextV,
"com.github.blemale" %% "scaffeine" % scaffeineV,
"io.github.hakky54" % "ayza" % ayzaV,
"org.typelevel" %% "cats-core" % catsV,
"org.typelevel" %% "cats-effect" % catsEffectV,
"com.thatdot" %% "quine-id" % quineCommonV,
"com.lihaoyi" %% "pprint" % pprintV,
"commons-codec" % "commons-codec" % commonsCodecV,
// Testing
"org.scalatest" %% "scalatest" % scalaTestV % Test,
"org.scalacheck" %% "scalacheck" % scalaCheckV % Test,
"org.scalatestplus" %% "scalacheck-1-17" % scalaTestScalaCheckV % Test,
"org.apache.pekko" %% "pekko-testkit" % pekkoTestkitV % Test,
"ch.qos.logback" % "logback-classic" % logbackV % Test,
"commons-io" % "commons-io" % commonsIoV % Test,
),
// Compile different files depending on scala version
Compile / unmanagedSourceDirectories += {
(Compile / sourceDirectory).value / "scala-2.13"
},
addCompilerPlugin("org.typelevel" %% "kind-projector" % kindProjectorV cross CrossVersion.full),
// Uncomment the following 2 lines to generate flamegraphs for the project's compilation in target/scala-2.13/classes/META-INF
// (look for `.flamegraph` files -- these may be imported into intellij profiler or flamegraph.pl)
// ThisBuild / scalacOptions += "-Vstatistics",
// addCompilerPlugin("ch.epfl.scala" %% "scalac-profiling" % "1.1.0-RC3" cross CrossVersion.full)
)
.enablePlugins(BuildInfoPlugin, FlatcPlugin)
.settings(
// Allow BuildInfo to be cached on `-DIRTY` versions, to avoid recompilation during development
buildInfoOptions := (if (git.gitUncommittedChanges.value) Seq() else Seq(BuildInfoOption.BuildTime)),
buildInfoKeys := Seq[BuildInfoKey](
version,
git.gitHeadCommit,
git.gitUncommittedChanges,
git.gitHeadCommitDate,
BuildInfoKey.action("javaVmName")(scala.util.Properties.javaVmName),
BuildInfoKey.action("javaVendor")(scala.util.Properties.javaVendor),
BuildInfoKey.action("javaVersion")(scala.util.Properties.javaVersion),
),
buildInfoPackage := "com.thatdot.quine",
)
// Quine Language - Cypher parser and language services
lazy val `quine-language`: Project = project
.settings(commonSettings)
.enablePlugins(Antlr4Plugin)
.settings(
libraryDependencies ++= Seq(
"org.antlr" % "antlr4-runtime" % antlr4RuntimeV,
"org.typelevel" %% "cats-effect" % catsEffectV,
"org.eclipse.lsp4j" % "org.eclipse.lsp4j" % lsp4jV,
"com.chuusai" %% "shapeless" % shapelessV,
"com.google.guava" % "guava" % guavaV,
"com.47deg" %% "memeid4s" % memeid4sV,
"com.thatdot" %% "quine-id" % quineCommonV,
"com.thatdot" %% "quine-utils" % quineCommonV,
// Testing
"org.scalameta" %% "munit" % munitV % Test,
),
Antlr4 / antlr4PackageName := Some("com.thatdot.quine.cypher.parsing"),
Antlr4 / antlr4Version := antlr4RuntimeV,
Antlr4 / antlr4GenListener := false,
Antlr4 / antlr4GenVisitor := true,
testFrameworks += new TestFramework("munit.Framework"),
addCompilerPlugin("org.typelevel" %% "kind-projector" % kindProjectorV cross CrossVersion.full),
)
lazy val `quine-serialization`: Project = project
.settings(commonSettings)
.dependsOn(
`data`,
`quine-core` % "compile->compile;test->test",
)
.settings(
libraryDependencies ++= Seq(
"com.google.api.grpc" % "proto-google-common-protos" % protobufCommonV,
"com.google.protobuf" % "protobuf-java" % protobufV,
"software.amazon.glue" % "schema-registry-serde" % amazonGlueV, // for its protobuf DynamicSchema utility
// Glue->AWS Netty Client->Netty, which has some CVEs. Glue 1.1.27 has vulnerable Netty; override to safe AWS SDK.
"software.amazon.awssdk" % "netty-nio-client" % awsSdkV,
"org.apache.avro" % "avro" % avroV,
"org.endpoints4s" %%% "json-schema-generic" % endpoints4sDefaultV,
"org.endpoints4s" %%% "json-schema-circe" % endpoints4sCirceV,
),
)
// MapDB implementation of a Quine persistor
lazy val `quine-mapdb-persistor`: Project = project
.settings(commonSettings)
.dependsOn(`quine-core` % "compile->compile;test->test")
.settings(
/* `net.jpountz.lz4:lz4` was moved to `org.lz4:lz4-java`, then to
* `at.yawk.lz4:lz4-java` (the maintained fork). MapDB still depends on the
* old coordinates, so we exclude the old JAR and pull in the current one.
*/
libraryDependencies ++= Seq(
("org.mapdb" % "mapdb" % mapDbV).exclude("net.jpountz.lz4", "lz4"),
"at.yawk.lz4" % "lz4-java" % lz4JavaV,
),
)
// RocksDB implementation of a Quine persistor
lazy val `quine-rocksdb-persistor`: Project = project
.settings(commonSettings)
.dependsOn(`quine-core` % "compile->compile;test->test")
.settings(
libraryDependencies ++= Seq(
"org.rocksdb" % "rocksdbjni" % rocksdbV,
),
)
// Cassandra implementation of a Quine persistor
lazy val `quine-cassandra-persistor`: Project = project
.configs(Integration)
.settings(commonSettings, integrationSettings)
.dependsOn(`quine-core` % "compile->compile;test->test")
.enablePlugins(spray.boilerplate.BoilerplatePlugin)
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % catsV,
"org.apache.cassandra" % "java-driver-query-builder" % cassandraClientV,
// The org name for the Cassandra java-driver was changed from com.datastax.oss to org.apache.cassandra
// The sigv4-auth plugin specifies a dep on com.datastax.oss, SBT doesn't know that our org.apache.cassandra
// dep is supposed to be the replacement for that, and includes both on the classpath, which then conflict
// at the sbt-assembly step (because they both have the same package names internally).
"software.aws.mcs" % "aws-sigv4-auth-cassandra-java-driver-plugin" % sigv4AuthCassandraPluginV exclude ("com.datastax.oss", "java-driver-core"),
"software.amazon.awssdk" % "sts" % awsSdkV,
"com.github.nosan" % "embedded-cassandra" % embeddedCassandraV % Test,
),
)
// Parser and interpreter for a subset of [Gremlin](https://tinkerpop.apache.org/gremlin.html)
lazy val `quine-gremlin`: Project = project
.settings(commonSettings)
.dependsOn(`quine-core` % "compile->compile;test->test")
.settings(
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-parser-combinators" % scalaParserCombinatorsV,
"org.apache.commons" % "commons-text" % commonsTextV,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
),
)
// Compiler for compiling [Cypher](https://neo4j.com/docs/cypher-manual/current/) into Quine queries
lazy val `quine-cypher`: Project = project
.settings(commonSettings)
.dependsOn(`quine-core` % "compile->compile;test->test")
.settings(
scalacOptions ++= Seq(
"-language:reflectiveCalls",
"-Xlog-implicits",
),
libraryDependencies ++= Seq(
"com.thatdot.opencypher" %% "expressions" % openCypherV,
"com.thatdot.opencypher" %% "front-end" % openCypherV,
"com.thatdot.opencypher" %% "opencypher-cypher-ast-factory" % openCypherV,
"com.thatdot.opencypher" %% "util" % openCypherV,
"org.typelevel" %% "cats-core" % catsV,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
"org.apache.pekko" %% "pekko-stream-testkit" % pekkoV % Test,
),
addCompilerPlugin("org.typelevel" % "kind-projector" % kindProjectorV cross CrossVersion.full),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % betterMonadicForV),
)
/*
* Version 7.5.1. It is expected that `Network` and `DataSet` are available under
* A globally available `vis` object, as with
*
* ```html
* <script
* type="text/javascript"
* src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"
* ></script>
* ```
*
* Thanks to [`scala-js-ts-importer`][ts-importer] which made it possible to generate
* A first pass of the facade directly from the Typescipt bindings provided with
* `vis-network` (see `Network.d.ts`).
*
* [ts-importer]: https://github.com/sjrd/scala-js-ts-importer
* [visjs]: https://github.com/visjs/vis-network
*/
lazy val `visnetwork-facade`: Project = project
.settings(commonSettings)
.enablePlugins(ScalaJSPlugin)
.settings(
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % scalajsDomV,
),
)
lazy val `aws`: Project = project
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"com.thatdot" %% "quine-logging" % quineCommonV,
"com.thatdot" %% "quine-security" % quineCommonV,
"software.amazon.awssdk" % "aws-core" % awsSdkV,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
),
)
lazy val `data`: Project = project
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"com.thatdot" %% "quine-logging" % quineCommonV,
"com.thatdot" %% "quine-utils" % quineCommonV,
"com.google.protobuf" % "protobuf-java" % protobufV,
"io.circe" %% "circe-core" % circeV,
"org.apache.avro" % "avro" % avroV,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
),
)
/** V2 API type definitions shared between server (JVM) and browser (ScalaJS). */
lazy val `quine-endpoints2` = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("quine-endpoints2"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"com.softwaremill.sttp.tapir" %%% "tapir-core" % tapirV,
"io.circe" %%% "circe-core" % circeV,
"io.circe" %%% "circe-generic-extras" % circeGenericExtrasV,
),
)
lazy val `api`: Project = project
.in(file("api"))
.settings(commonSettings)
.dependsOn(`quine-serialization`, `quine-endpoints2`.jvm)
.settings(
libraryDependencies ++= Seq(
"com.thatdot" %% "quine-security" % quineCommonV,
"com.softwaremill.sttp.tapir" %% "tapir-core" % tapirV,
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirV,
"io.circe" %% "circe-core" % circeV,
"io.circe" %% "circe-generic-extras" % circeGenericExtrasV,
"io.circe" %% "circe-yaml" % circeYamlV,
"com.thatdot" %% "quine-security" % quineCommonV,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
"org.scalatestplus" %% "scalacheck-1-17" % scalaTestScalaCheckV % Test,
),
)
lazy val `outputs2`: Project = project
.settings(commonSettings)
.dependsOn(`aws`, `data`, `quine-core`, `quine-serialization`)
.settings(
libraryDependencies ++= Seq(
"com.thatdot" %% "quine-logging" % quineCommonV,
"org.apache.pekko" %% "pekko-actor" % pekkoV,
"org.apache.pekko" %% "pekko-stream" % pekkoV,
"org.apache.pekko" %% "pekko-http" % pekkoHttpV,
"org.apache.pekko" %% "pekko-connectors-kafka" % pekkoKafkaV,
"org.apache.pekko" %% "pekko-connectors-kinesis" % pekkoConnectorsV,
"org.apache.pekko" %% "pekko-connectors-sns" % pekkoConnectorsV,
"software.amazon.awssdk" % "netty-nio-client" % awsSdkV,
"com.google.protobuf" % "protobuf-java" % protobufV,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
"org.scalacheck" %%% "scalacheck" % scalaCheckV % Test,
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpV % Test,
),
)
/** V1 API definitions (that may be used for internal modeling at times) for `quine`-based applications */
lazy val `quine-endpoints` = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("quine-endpoints"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"com.thatdot" %%% "quine-security" % quineCommonV,
"org.endpoints4s" %%% "json-schema-generic" % endpoints4sDefaultV,
"org.endpoints4s" %%% "json-schema-circe" % endpoints4sCirceV,
"io.circe" %% "circe-core" % circeV,
"org.endpoints4s" %%% "openapi" % endpoints4sOpenapiV,
"com.lihaoyi" %% "ujson-circe" % ujsonCirceV, // For the OpenAPI rendering
"org.scalacheck" %%% "scalacheck" % scalaCheckV % Test,
"org.scalatest" %%% "scalatest" % scalaTestV % Test,
"com.softwaremill.sttp.tapir" %% "tapir-core" % tapirV, // For tapir annotations
),
)
.jsSettings(
// Provides an implementation that allows us to use java.time.Instant in Scala.js
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeV,
)
/** Contains the common (among product needs) converters/conversions between
* the independent definitions of API models and internal models. Notably
* not versioned because versioning of API and internal models are independent.
*/
lazy val `model-converters`: Project = project
.settings(commonSettings)
.dependsOn(
`api`,
`outputs2`,
`quine-endpoints`.jvm,
)
// Quine web application
lazy val `quine-browser`: Project = project
.settings(commonSettings, visNetworkSettings)
.dependsOn(`quine-endpoints`.js, `visnetwork-facade`, `quine-endpoints2`.js)
.enablePlugins(ScalaJSBundlerPlugin)
.settings(
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % scalajsDomV,
"org.scala-js" %%% "scala-js-macrotask-executor" % scalajsMacroTaskExecutorV,
"org.endpoints4s" %%% "xhr-client" % endpoints4sXhrClientV,
"io.circe" %%% "circe-generic" % circeV,
"io.circe" %%% "circe-parser" % circeV,
"com.raquo" %%% "laminar" % laminarV,
"com.raquo" %%% "waypoint" % waypointV,
),
Compile / npmDevDependencies ++= Seq(
// When updating, check whether the minimatch yarn resolution below is still needed
"ts-loader" -> "8.0.0",
"typescript" -> "4.9.5",
"@types/node" -> "16.7.13",
// Webpack 5 loaders and polyfills (required by common.webpack.config.js)
"style-loader" -> "3.3.4",
"css-loader" -> "6.11.0",
"buffer" -> "6.0.3",
"stream-browserify" -> "3.0.0",
"path-browserify" -> "1.0.1",
"process" -> "0.11.10",
),
Compile / npmDependencies ++= Seq(
"es6-shim" -> "0.35.7",
"plotly.js" -> s"npm:plotly.js-strict-dist-min@${plotlyV}", // CSP-compliant strict bundle
"@stoplight/elements" -> stoplightElementsV,
"react" -> reactV, // Peer dependency of @stoplight/elements
"react-dom" -> reactV,
"mkdirp" -> "1.0.0",
"@coreui/coreui" -> coreuiV,
"@coreui/icons" -> coreuiIconsV,
"@fontsource-variable/inter" -> fontsourceInterV,
"@popperjs/core" -> "2.11.8",
"d3" -> d3V,
),
// Force patched dependency versions via yarn resolutions (see NPM Override Versions in Dependencies.scala)
Compile / additionalNpmConfig := Map(
"resolutions" -> obj(
"lodash" -> str(lodashV),
"react-router" -> str(reactRouterV),
"react-router-dom" -> str(reactRouterV),
"@remix-run/router" -> str(remixRunRouterV),
"minimatch" -> str(minimatchV),
"yaml" -> str(yamlV),
"brace-expansion" -> str(braceExpansionV),
),
),
webpackNodeArgs := nodeLegacySslIfAvailable,
// Scalajs-bundler 0.21.1 updates to webpack 5 but doesn't inform webpack that the scalajs-based file it emits is
// an entrypoint -- therefore webpack emits an error saying effectively, "no entrypoint" that we must ignore.
// This aggressively ignores all warnings from webpack, which is more than necessary, but trivially works
webpackExtraArgs := Seq("--ignore-warnings-message", "/.*/"),
fastOptJS / webpackConfigFile := Some(baseDirectory.value / "dev.webpack.config.js"),
fastOptJS / webpackDevServerExtraArgs := Seq("--inline", "--hot"),
fullOptJS / webpackConfigFile := Some(baseDirectory.value / "prod.webpack.config.js"),
Test / webpackConfigFile := Some(baseDirectory.value / "common.webpack.config.js"),
test := {},
useYarn := true,
yarnExtraArgs := Seq("--frozen-lockfile"),
)
// Streaming graph application built on top of the Quine library
lazy val `quine`: Project = project
.settings(commonSettings)
.dependsOn(
`quine-core` % "compile->compile;test->test",
`quine-cypher` % "compile->compile;test->test",
`quine-endpoints`.jvm % "compile->compile;test->test",
`data` % "compile->compile;test->test",
`api` % "compile->compile;test->test",
`model-converters`,
`outputs2` % "compile->compile;test->test",
`quine-gremlin`,
`quine-cassandra-persistor`,
`quine-mapdb-persistor`,
`quine-rocksdb-persistor`,
)
.settings(
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % logbackV,
"com.github.davidb" % "metrics-influxdb" % metricsInfluxdbV,
"com.github.jnr" % "jnr-posix" % jnrPosixV,
"com.github.pjfanning" %% "pekko-http-circe" % pekkoHttpCirceV,
"com.github.pureconfig" %% "pureconfig" % pureconfigV,
"com.github.scopt" %% "scopt" % scoptV,
"com.google.api.grpc" % "proto-google-common-protos" % protobufCommonV,
"com.github.ben-manes.caffeine" % "caffeine" % caffeineV,
"com.github.blemale" %% "scaffeine" % scaffeineV,
"com.google.protobuf" % "protobuf-java" % protobufV,
"com.softwaremill.sttp.tapir" %% "tapir-pekko-http-server" % tapirV,
"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % tapirV,
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirV,
"com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % openApiCirceYamlV exclude ("io.circe", "circe-yaml"),
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpV % Test,
"io.circe" %% "circe-yaml" % circeYamlV,
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingV,
"ch.qos.logback" % "logback-classic" % logbackV,
"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % tapirV % Test,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
//"commons-io" % "commons-io" % commonsIoV % Test,
"io.circe" %% "circe-config" % "0.10.2",
"io.circe" %% "circe-generic-extras" % circeGenericExtrasV,
"io.circe" %% "circe-yaml-v12" % "0.16.1",
"io.circe" %% "circe-core" % circeV,
"io.dropwizard.metrics" % "metrics-core" % dropwizardMetricsV,
"io.dropwizard.metrics" % "metrics-jmx" % dropwizardMetricsV,
"io.dropwizard.metrics" % "metrics-jvm" % dropwizardMetricsV,
"org.apache.commons" % "commons-csv" % apacheCommonsCsvV,
"org.apache.kafka" % "kafka-clients" % kafkaClientsV,
"org.apache.pekko" %% "pekko-connectors-csv" % pekkoConnectorsV,
"org.apache.pekko" %% "pekko-connectors-kafka" % pekkoKafkaV,
"org.apache.pekko" %% "pekko-connectors-kinesis" % pekkoConnectorsV exclude ("org.rocksdb", "rocksdbjni"),
"software.amazon.kinesis" % "amazon-kinesis-client" % amazonKinesisClientV,
"org.apache.pekko" %% "pekko-connectors-s3" % pekkoConnectorsV,
"org.apache.pekko" %% "pekko-connectors-sns" % pekkoConnectorsV,
"org.apache.pekko" %% "pekko-connectors-sqs" % pekkoConnectorsV,
"org.apache.pekko" %% "pekko-connectors-sse" % pekkoConnectorsV,
"org.apache.pekko" %% "pekko-connectors-text" % pekkoConnectorsV,
// pekko-http-xml is not a direct dep, but an older version is pulled in transitively by
// pekko-connectors-s3 above. All pekko-http module version numbers need to match exactly, or else it throws
// at startup: "java.lang.IllegalStateException: Detected possible incompatible versions on the classpath."
"org.apache.pekko" %% "pekko-http-xml" % pekkoHttpV,
"org.apache.pekko" %% "pekko-stream-testkit" % pekkoV % Test,
"org.endpoints4s" %% "pekko-http-server" % endpoints4sHttpServerV,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
"org.scalatestplus" %% "scalacheck-1-17" % scalaTestScalaCheckV % Test,
// WebJars (javascript dependencies masquerading as JARs)
"org.webjars" % "ionicons" % ioniconsV,
"org.webjars" % "jquery" % jqueryV,
"org.webjars" % "webjars-locator" % webjarsLocatorV,
"org.webjars.npm" % "sugar-date" % sugarV,
"org.apache.avro" % "avro" % avroV,
// AWS SDK deps (next 4) effectively bundle sibling JARs needed for certain features, despite no code references
"software.amazon.awssdk" % "sso" % awsSdkV,
"software.amazon.awssdk" % "ssooidc" % awsSdkV,
"software.amazon.awssdk" % "sts" % awsSdkV,
"software.amazon.awssdk" % "aws-query-protocol" % awsSdkV,
),
// Add JVM options for tests to allow reflection access to java.util (needed for env var manipulation in tests)
Test / javaOptions += "--add-opens=java.base/java.util=ALL-UNNAMED",
Test / fork := true,
)
.enablePlugins(WebScalaJSBundlerPlugin)
.settings(
scalaJSProjects := Seq(`quine-browser`),
Assets / pipelineStages := Seq(scalaJSPipeline),
)
.enablePlugins(BuildInfoPlugin, Packaging, Docker, Ecr)
.settings(
startupMessage := "",
buildInfoKeys := Seq[BuildInfoKey](version, startupMessage),
buildInfoPackage := "com.thatdot.quine.app",
)
lazy val `quine-docs`: Project = {
val docJsonV1 = Def.setting((Compile / sourceManaged).value / "reference" / "openapi-v1.json")
val docJsonV2 = Def.setting((Compile / sourceManaged).value / "reference" / "openapi-v2.json")
val cypherTable1 = Def.setting((Compile / sourceManaged).value / "reference" / "cypher-builtin-functions.md")
val cypherTable2 =
Def.setting((Compile / sourceManaged).value / "reference" / "cypher-user-defined-functions.md")
val cypherTable3 =
Def.setting((Compile / sourceManaged).value / "reference" / "cypher-user-defined-procedures.md")
val generateDocs = TaskKey[Unit]("generateDocs", "Generate documentation tables for the Quine (Mkdocs) project")
Project("quine-docs", file("quine-docs"))
.dependsOn(`quine`)
.settings(commonSettings)
.settings(
generateDocs := Def
.sequential(
Def.taskDyn {
(Compile / runMain)
.toTask(
List(
" com.thatdot.quine.docs.GenerateCypherTables",
cypherTable1.value.getAbsolutePath,
cypherTable2.value.getAbsolutePath,
cypherTable3.value.getAbsolutePath,
).mkString(" "),
)
},
Def.taskDyn {
(Compile / runMain)
.toTask(s" com.thatdot.quine.docs.GenerateOpenApi ${docJsonV1.value.getAbsolutePath}")
},
Def.taskDyn {
(Compile / runMain)
.toTask(s" com.thatdot.quine.docs.GenerateOpenApiV2 ${docJsonV2.value.getAbsolutePath}")
},
)
.value,
)
.settings(
libraryDependencies ++= Seq(
"org.pegdown" % "pegdown" % pegdownV,
"org.parboiled" % "parboiled-java" % parboiledV,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
),
)
}
// Spurious warnings
Global / excludeLintKeys += `quine-browser` / webpackNodeArgs
Global / excludeLintKeys += `quine-browser` / webpackExtraArgs