forked from JDvorak/slamengine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
760 lines (669 loc) · 28 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
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
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
import github.GithubPlugin._
import scala.Predef._
import quasar.project._
import java.lang.{Integer, String, Throwable}
import scala.{Boolean, List, Predef, None, Some, StringContext, sys, Unit}, Predef.{any2ArrowAssoc, assert, augmentString}
import scala.collection.Seq
import scala.collection.immutable.Map
import scala.sys.process._
import sbt._, Keys._
import sbt.std.Transform.DummyTaskMap
import sbt.TestFrameworks.Specs2
import sbtrelease._, ReleaseStateTransformations._, Utilities._
import scoverage._
import slamdata.SbtSlamData.transferPublishAndTagResources
val BothScopes = "test->test;compile->compile"
// Exclusive execution settings
lazy val ExclusiveTests = config("exclusive") extend Test
val ExclusiveTest = Tags.Tag("exclusive-test")
def exclusiveTasks(tasks: Scoped*) =
tasks.flatMap(inTask(_)(tags := Seq((ExclusiveTest, 1))))
lazy val buildSettings = commonBuildSettings ++ Seq(
organization := "org.quasar-analytics",
scalaOrganization := "org.scala-lang",
scalacOptions --= Seq(
"-Yliteral-types",
"-Xstrict-patmat-analysis",
"-Yinduction-heuristics",
"-Ykind-polymorphism",
"-Ybackend:GenBCode"
),
initialize := {
val version = sys.props("java.specification.version")
assert(
Integer.parseInt(version.split("\\.")(1)) >= 8,
"Java 8 or above required, found " + version)
},
ScoverageKeys.coverageHighlighting := true,
scalacOptions += "-target:jvm-1.8",
// NB: -Xlint triggers issues that need to be fixed
scalacOptions --= Seq("-Xlint"),
// NB: Some warts are disabled in specific projects. Here’s why:
// • AsInstanceOf – wartremover/wartremover#266
// • others – simply need to be reviewed & fixed
wartremoverWarnings in (Compile, compile) --= Seq(
Wart.Any, // - see wartremover/wartremover#263
Wart.PublicInference, // - creates many compile errors when enabled - needs to be enabled incrementally
Wart.ImplicitParameter, // - creates many compile errors when enabled - needs to be enabled incrementally
Wart.ImplicitConversion, // - see mpilquist/simulacrum#35
Wart.Nothing), // - see wartremover/wartremover#263
// Normal tests exclude those tagged in Specs2 with 'exclusive'.
testOptions in Test := Seq(Tests.Argument(Specs2, "exclude", "exclusive", "showtimes")),
// Exclusive tests include only those tagged with 'exclusive'.
testOptions in ExclusiveTests := Seq(Tests.Argument(Specs2, "include", "exclusive", "showtimes")),
logBuffered in Test := isTravisBuild.value,
console := { (console in Test).value }) // console alias test:console
val targetSettings = Seq(
target := {
import java.io.File
val root = (baseDirectory in ThisBuild).value.getAbsolutePath
val ours = baseDirectory.value.getAbsolutePath
new File(root + File.separator + ".targets" + File.separator + ours.substring(root.length))
}
)
lazy val backendRewrittenRunSettings = Seq(
run := {
val delegate = streams.value.log
val args = complete.DefaultParsers.spaceDelimited("<arg>").parsed
delegate.info("Computing classpaths of dependent backends...")
val parentCp = (fullClasspath in connector in Compile).value.files
val backends = isolatedBackends.value map {
case (name, childCp) =>
val classpathStr =
createBackendEntry(childCp, parentCp).map(_.getAbsolutePath).mkString(",")
"--backend:" + name + "=" + classpathStr
}
val main = (mainClass in Compile).value.getOrElse(sys.error("unspecified main class; huzzah huzzah huzzah"))
val r = runner.value
val prefix = s"Running ${main}"
val filtered = new Logger {
def log(level: Level.Value, _message: => String): Unit = {
lazy val message = _message
if (level == Level.Info && message.startsWith(prefix))
delegate.info(prefix + "...")
else
delegate.log(level, message)
}
def success(message: => String): Unit = delegate.success(message)
def trace(t: => Throwable): Unit = delegate.trace(t)
}
r.run(main, (fullClasspath in Compile).value.files, args ++ backends, filtered)
})
// In Travis, the processor count is reported as 32, but only ~2 cores are
// actually available to run.
concurrentRestrictions in Global := {
val maxTasks = 2
if (isTravisBuild.value)
// Recreate the default rules with the task limit hard-coded:
Seq(Tags.limitAll(maxTasks), Tags.limit(Tags.ForkedTestGroup, 1))
else
(concurrentRestrictions in Global).value
}
// Tasks tagged with `ExclusiveTest` should be run exclusively.
concurrentRestrictions in Global += Tags.exclusive(ExclusiveTest)
version in ThisBuild := {
val currentVersion = (version in ThisBuild).value
if (!isTravisBuild.value)
currentVersion + "-" + "git rev-parse HEAD".!!.substring(0, 7)
else
currentVersion
}
useGpg in Global := {
val oldValue = (useGpg in Global).value
!isTravisBuild.value || oldValue
}
lazy val publishSettings = commonPublishSettings ++ Seq(
performSonatypeSync := false, // basically just ignores all the sonatype sync parts of things
organizationName := "SlamData Inc.",
organizationHomepage := Some(url("http://quasar-analytics.org")),
homepage := Some(url("https://github.com/quasar-analytics/quasar")),
scmInfo := Some(
ScmInfo(
url("https://github.com/quasar-analytics/quasar"),
"scm:[email protected]:quasar-analytics/quasar.git"
)
),
bintrayCredentialsFile := {
val oldValue = bintrayCredentialsFile.value
if (!isTravisBuild.value)
Path.userHome / ".bintray" / ".credentials"
else
oldValue
})
lazy val assemblySettings = Seq(
test in assembly := {},
assemblyMergeStrategy in assembly := {
case PathList("META-INF", "io.netty.versions.properties") => MergeStrategy.last
case PathList("org", "apache", "hadoop", "yarn", xs @ _*) => MergeStrategy.last
case PathList("org", "objectweb", "asm", xs @ _*) => MergeStrategy.last // TODO remove this
case PathList("javax", "ws", "rs", xs @ _*) => MergeStrategy.last // and this
case PathList("javax", "servlet", xs @ _*) => MergeStrategy.last // and this
case PathList("com", "sun", "research", "ws", xs @ _*) => MergeStrategy.last // and this
case PathList("mime.types", xs @ _*) => MergeStrategy.last // and this once each spark based connector has its own subproject
case PathList("com", "google", "common", "base", xs @ _*) => MergeStrategy.last
case "log4j.properties" => MergeStrategy.discard
// After recent library version upgrades there seems to be a library pulling
// in the scala-lang scala-compiler 2.11.11 jar. It comes bundled with jansi OS libraries
// which conflict with similar jansi libraries brought in by fusesource.jansi.jansi-1.11
// So the merge needed the following lines to avoid the "deduplicate: different file contents found"
// produced by web/assembly. Look into removing this once we move to scala v2.11.11.
case s if s.endsWith("libjansi.jnilib") => MergeStrategy.last
case s if s.endsWith("jansi.dll") => MergeStrategy.last
case s if s.endsWith("libjansi.so") => MergeStrategy.last
case other => (assemblyMergeStrategy in assembly).value apply other
},
assemblyExcludedJars in assembly := {
val cp = (fullClasspath in assembly).value
cp filter { attributedFile =>
val file = attributedFile.data
val excludeByName: Boolean = file.getName.matches("""scala-library-2\.12\.\d+\.jar""")
val excludeByPath: Boolean = file.getPath.contains("org/typelevel")
excludeByName && excludeByPath
}
}
)
// Build and publish a project, excluding its tests.
lazy val commonSettings = buildSettings ++ publishSettings ++ assemblySettings
// not doing this causes NoSuchMethodErrors when using coursier
lazy val excludeTypelevelScalaLibrary =
Seq(excludeDependencies += "org.typelevel" % "scala-library")
// Include to also publish a project's tests
lazy val publishTestsSettings = Seq(
publishArtifact in (Test, packageBin) := true
)
lazy val githubReleaseSettings =
githubSettings ++ Seq(
GithubKeys.assets := Seq(assembly.value),
GithubKeys.repoSlug := "quasar-analytics/quasar",
GithubKeys.releaseName := "quasar " + GithubKeys.tag.value,
releaseVersionFile := file("version.sbt"),
releaseUseGlobalVersion := true,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runTest,
setReleaseVersion,
commitReleaseVersion,
pushChanges)
)
def isolatedBackendSettings(classnames: String*) = Seq(
isolatedBackends in Global ++=
classnames.map(_ -> (fullClasspath in Compile).value.files),
packageOptions in (Compile, packageBin) +=
Package.ManifestAttributes("Backend-Module" -> classnames.mkString(" ")))
lazy val isCIBuild = settingKey[Boolean]("True when building in any automated environment (e.g. Travis)")
lazy val isIsolatedEnv = settingKey[Boolean]("True if running in an isolated environment")
lazy val exclusiveTestTag = settingKey[String]("Tag for exclusive execution tests")
lazy val sparkDependencyProvided = settingKey[Boolean]("Whether or not the spark dependency should be marked as provided. If building for use in a Spark cluster, one would set this to true otherwise setting it to false will allow you to run the assembly jar on it's own")
lazy val isolatedBackends =
taskKey[Seq[(String, Seq[File])]]("Global-only setting which contains all of the classpath-isolated backends")
isolatedBackends in Global := Seq()
lazy val sideEffectTestFSConfig = taskKey[Unit]("Rewrite the JVM environment to contain the filesystem classpath information for integration tests")
def createBackendEntry(childPath: Seq[File], parentPath: Seq[File]): Seq[File] =
(childPath.toSet -- parentPath.toSet).toSeq
lazy val root = project.in(file("."))
.settings(commonSettings)
.settings(noPublishSettings)
.settings(transferPublishAndTagResources)
.settings(aggregate in assembly := false)
.settings(excludeTypelevelScalaLibrary)
.aggregate(
// NB: need to get dependencies to look like:
// ┌ common ┐
// ┌ frontend ┬ connector ┬─────────┬──────┐
// sql core marklogic mongodb ...
// └──────────┼───────────┴─────────┴──────┘
// interface
foundation,
// / \
ejson, js,
// \ /
common, // <--
// / \ \
effect, frontend, precog,
// | / | \ |
datagen, blueeyes,
// | | |
niflheim,
// | | |
sql, connector, yggdrasil,
// | / | | \ \______|____________________________________________
// | / | | \ / \ \ \ \ \
core, skeleton, mimir, marklogic, mongodb, couchbase, /*sparkcore,*/ rdbms,
// \ | / | | | | |
interface, // | | | | |
// / \ | | | | |
repl, web, // | | | | |
// | | | | | |
it, // | | | | |
// ___________|_____________/ | | | |
// / | __________________/ | | |
// | /|\ / __________________/ | |
// | / | \ / / _______________/ /
// | / | \/__________/______ / ____________/
// | / | / \ / \ / /
marklogicIt, mongoIt, couchbaseIt, /*sparkcoreIt,*/ rdbmsIt
//
// NB: the *It projects are temporary until we polyrepo
).enablePlugins(AutomateHeaderPlugin)
// common components
/** Very general utilities, ostensibly not Quasar-specific, but they just aren’t
* in other places yet. This also contains `contrib` packages for things we’d
* like to push to upstream libraries.
*/
lazy val foundation = project
.settings(name := "quasar-foundation-internal")
.settings(commonSettings)
.settings(publishTestsSettings)
.settings(targetSettings)
.settings(
buildInfoKeys := Seq[BuildInfoKey](version, ScoverageKeys.coverageEnabled, isCIBuild, isIsolatedEnv, exclusiveTestTag),
buildInfoPackage := "quasar.build",
exclusiveTestTag := "exclusive",
isCIBuild := isTravisBuild.value,
isIsolatedEnv := java.lang.Boolean.parseBoolean(java.lang.System.getProperty("isIsolatedEnv")),
libraryDependencies ++= Dependencies.foundation)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin, BuildInfoPlugin)
/** A fixed-point implementation of the EJson spec. This should probably become
* a standalone library.
*/
lazy val ejson = project
.settings(name := "quasar-ejson-internal")
.dependsOn(foundation % BothScopes)
.settings(libraryDependencies ++= Dependencies.ejson)
.settings(commonSettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val effect = project
.settings(name := "quasar-effect-internal")
.dependsOn(foundation % BothScopes)
.settings(libraryDependencies ++= Dependencies.effect)
.settings(commonSettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** Somewhat Quasar- and MongoDB-specific JavaScript implementations.
*/
lazy val js = project
.settings(name := "quasar-js-internal")
.dependsOn(foundation % BothScopes)
.settings(commonSettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** Quasar components shared by both frontend and connector. This includes
* things like data models, types, etc.
*/
lazy val common = project
.settings(name := "quasar-common-internal")
// TODO: The dependency on `js` is because `Data` encapsulates its `toJs`,
// which should be extracted.
.dependsOn(foundation % BothScopes, ejson % BothScopes, js % BothScopes)
.settings(commonSettings)
.settings(publishTestsSettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** The compiler from `LogicalPlan` to `QScript` – this is the bulk of
* transformation, type checking, optimization, etc.
*/
lazy val core = project
.settings(name := "quasar-core-internal")
.dependsOn(frontend % BothScopes, connector % BothScopes, sql)
.settings(commonSettings)
.settings(publishTestsSettings)
.settings(targetSettings)
.settings(
libraryDependencies ++= Dependencies.core,
ScoverageKeys.coverageMinimum := 79,
ScoverageKeys.coverageFailOnMinimum := true)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
// frontends
/** Types and operations needed by query language implementations.
*/
lazy val frontend = project
.settings(name := "quasar-frontend-internal")
.dependsOn(common % BothScopes)
.settings(commonSettings)
.settings(publishTestsSettings)
.settings(targetSettings)
.settings(
libraryDependencies ++= Dependencies.frontend,
ScoverageKeys.coverageMinimum := 79,
ScoverageKeys.coverageFailOnMinimum := true)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val datagen = project
.settings(name := "quasar-datagen")
.dependsOn(frontend % BothScopes)
.settings(commonSettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.settings(
mainClass in Compile := Some("quasar.datagen.Main"),
libraryDependencies ++= Dependencies.datagen)
.enablePlugins(AutomateHeaderPlugin)
/** Implementation of the SQL² query language.
*/
lazy val sql = project
.settings(name := "quasar-sql-internal")
.dependsOn(frontend % BothScopes)
.settings(commonSettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
// connectors
/** Types and operations needed by connector implementations.
*/
lazy val connector = project
.settings(name := "quasar-connector-internal")
.dependsOn(
common % BothScopes,
effect % BothScopes,
frontend % BothScopes,
sql % "test->test")
.settings(commonSettings)
.settings(publishTestsSettings)
.settings(targetSettings)
.settings(
ScoverageKeys.coverageMinimum := 79,
ScoverageKeys.coverageFailOnMinimum := true)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** Implementation of the Couchbase connector.
*/
lazy val couchbase = project
.settings(name := "quasar-couchbase-internal")
.dependsOn(connector % BothScopes)
.settings(commonSettings)
.settings(targetSettings)
.settings(libraryDependencies ++= Dependencies.couchbase)
.settings(githubReleaseSettings)
.settings(isolatedBackendSettings("quasar.physical.couchbase.Couchbase$"))
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** Implementation of the MarkLogic connector.
*/
lazy val marklogic = project
.settings(name := "quasar-marklogic-internal")
.dependsOn(connector % BothScopes)
.settings(commonSettings)
.settings(targetSettings)
.settings(resolvers += "MarkLogic" at "http://developer.marklogic.com/maven2")
.settings(libraryDependencies ++= Dependencies.marklogic)
.settings(githubReleaseSettings)
.settings(isolatedBackendSettings("quasar.physical.marklogic.MarkLogic$"))
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** Implementation of the MongoDB connector.
*/
lazy val mongodb = project
.settings(name := "quasar-mongodb-internal")
.dependsOn(
connector % BothScopes,
js % BothScopes,
core % "test->compile")
.settings(commonSettings)
.settings(targetSettings)
.settings(
libraryDependencies ++= Dependencies.mongodb,
wartremoverWarnings in (Compile, compile) --= Seq(
Wart.AsInstanceOf,
Wart.Equals,
Wart.Overloading))
.settings(githubReleaseSettings)
.settings(isolatedBackendSettings("quasar.physical.mongodb.MongoDb$"))
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** A connector outline, meant to be copied and incrementally filled in while
* implementing a new connector.
*/
lazy val skeleton = project
.settings(name := "quasar-skeleton-internal")
.dependsOn(connector % BothScopes)
.settings(commonSettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val rdbms = project
.settings(name := "quasar-rdbms-internal")
.dependsOn(connector % BothScopes,
core % "test->compile")
.settings(commonSettings)
.settings(targetSettings)
.settings(githubReleaseSettings)
.settings(libraryDependencies ++= Dependencies.rdbmscore)
.settings(isolatedBackendSettings("quasar.physical.rdbms.fs.postgres.Postgres$"))
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** Implementation of the Spark connector.
*/
/*lazy val sparkcore = project
.settings(name := "quasar-sparkcore-internal")
.dependsOn(
connector % BothScopes
)
.settings(commonSettings)
.settings(targetSettings)
.settings(githubReleaseSettings)
// re-add the sparkcore.jar that we hopefully generated
// se really should generate this more explicitly, rather than relying on the CI script
// it's hard though because generating it requires setting and then un-setting some keys
.settings(GithubKeys.assets += crossTarget.value / "sparkcore.jar")
.settings(parallelExecution in Test := false)
.settings(
sparkDependencyProvided := false,
libraryDependencies ++= Dependencies.sparkcore(sparkDependencyProvided.value))
.settings(
isolatedBackendSettings(
"quasar.physical.sparkcore.fs.cassandra.SparkCassandra$",
"quasar.physical.sparkcore.fs.elastic.SparkElastic$",
"quasar.physical.sparkcore.fs.hdfs.SparkHdfs$",
"quasar.physical.sparkcore.fs.local.SparkLocal$"))
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)*/
// interfaces
/** Types and operations needed by applications that embed Quasar.
*/
lazy val interface = project
.settings(name := "quasar-interface-internal")
.dependsOn(
core % BothScopes,
skeleton,
mimir)
.settings(commonSettings)
.settings(publishTestsSettings)
.settings(targetSettings)
.settings(libraryDependencies ++= Dependencies.interface)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** An interactive REPL application for Quasar.
*/
lazy val repl = project
.settings(name := "quasar-repl")
.dependsOn(interface, foundation % BothScopes)
.settings(commonSettings)
.settings(githubReleaseSettings)
.settings(targetSettings)
.settings(backendRewrittenRunSettings)
.settings(
fork in run := true,
connectInput in run := true,
outputStrategy := Some(StdoutOutput))
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** An HTTP interface to Quasar.
*/
lazy val web = project
.settings(name := "quasar-web")
.dependsOn(interface % BothScopes, core % BothScopes)
.settings(commonSettings)
.settings(publishTestsSettings)
.settings(githubReleaseSettings)
.settings(targetSettings)
.settings(backendRewrittenRunSettings)
.settings(
mainClass in Compile := Some("quasar.server.Server"),
libraryDependencies ++= Dependencies.web)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/** Integration tests that have some dependency on a running connector.
*/
lazy val it = project
.settings(name := "quasar-it-internal")
.configs(ExclusiveTests)
.dependsOn(web % BothScopes, core % BothScopes)
.settings(commonSettings)
.settings(publishTestsSettings)
.settings(targetSettings)
.settings(libraryDependencies ++= Dependencies.it)
// Configure various test tasks to run exclusively in the `ExclusiveTests` config.
.settings(inConfig(ExclusiveTests)(Defaults.testTasks): _*)
.settings(inConfig(ExclusiveTests)(exclusiveTasks(test, testOnly, testQuick)): _*)
.settings(parallelExecution in Test := false)
.settings(
sideEffectTestFSConfig := {
val LoadCfgProp = "slamdata.internal.fs-load-cfg"
val parentCp = (fullClasspath in connector in Compile).value.files
val backends = isolatedBackends.value map {
case (name, childCp) =>
val classpathStr =
createBackendEntry(childCp, parentCp).map(_.getAbsolutePath).mkString(":")
name + "=" + classpathStr
}
if (java.lang.System.getProperty(LoadCfgProp, "").isEmpty) {
// we aren't forking tests, so we just set the property in the current JVM
java.lang.System.setProperty(LoadCfgProp, backends.mkString(";"))
}
()
},
test := Def.taskDyn {
val _ = sideEffectTestFSConfig.value
test in Test
}.value)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val marklogicIt = project
.configs(ExclusiveTests)
.dependsOn(it % BothScopes, marklogic % BothScopes)
.settings(commonSettings)
.settings(noPublishSettings)
.settings(targetSettings)
// Configure various test tasks to run exclusively in the `ExclusiveTests` config.
.settings(inConfig(ExclusiveTests)(Defaults.testTasks): _*)
.settings(inConfig(ExclusiveTests)(exclusiveTasks(test, testOnly, testQuick)): _*)
.settings(parallelExecution in Test := false)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val mongoIt = project
.configs(ExclusiveTests)
.dependsOn(it % BothScopes, mongodb)
.settings(commonSettings)
.settings(noPublishSettings)
.settings(targetSettings)
// Configure various test tasks to run exclusively in the `ExclusiveTests` config.
.settings(inConfig(ExclusiveTests)(Defaults.testTasks): _*)
.settings(inConfig(ExclusiveTests)(exclusiveTasks(test, testOnly, testQuick)): _*)
.settings(parallelExecution in Test := false)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val couchbaseIt = project
.configs(ExclusiveTests)
.dependsOn(it % BothScopes, couchbase)
.settings(commonSettings)
.settings(noPublishSettings)
.settings(targetSettings)
// Configure various test tasks to run exclusively in the `ExclusiveTests` config.
.settings(inConfig(ExclusiveTests)(Defaults.testTasks): _*)
.settings(inConfig(ExclusiveTests)(exclusiveTasks(test, testOnly, testQuick)): _*)
.settings(parallelExecution in Test := false)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/*lazy val sparkcoreIt = project
.configs(ExclusiveTests)
.dependsOn(it % BothScopes, sparkcore)
.settings(commonSettings)
.settings(noPublishSettings)
.settings(targetSettings)
// Configure various test tasks to run exclusively in the `ExclusiveTests` config.
.settings(inConfig(ExclusiveTests)(Defaults.testTasks): _*)
.settings(inConfig(ExclusiveTests)(exclusiveTasks(test, testOnly, testQuick)): _*)
.settings(parallelExecution in Test := false)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)*/
lazy val rdbmsIt = project
.configs(ExclusiveTests)
.dependsOn(it % BothScopes, rdbms)
.settings(commonSettings)
.settings(noPublishSettings)
.settings(targetSettings)
// Configure various test tasks to run exclusively in the `ExclusiveTests` config.
.settings(inConfig(ExclusiveTests)(Defaults.testTasks): _*)
.settings(inConfig(ExclusiveTests)(exclusiveTasks(test, testOnly, testQuick)): _*)
.settings(parallelExecution in Test := false)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
/***** PRECOG *****/
import precogbuild.Build._
lazy val precog = project.setup
.settings(name := "quasar-precog-internal")
.dependsOn(common % BothScopes)
.withWarnings
.settings(libraryDependencies ++= Dependencies.precog)
.settings(headerLicenseSettings)
.settings(publishSettings)
.settings(assemblySettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val blueeyes = project.setup
.settings(name := "quasar-blueeyes-internal")
.dependsOn(precog % BothScopes, frontend)
.withWarnings
.settings(libraryDependencies ++= Dependencies.blueeyes)
.settings(headerLicenseSettings)
.settings(publishSettings)
.settings(assemblySettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val mimir = project.setup
.settings(name := "quasar-mimir-internal")
.dependsOn(yggdrasil % BothScopes, blueeyes, precog % BothScopes, connector)
.scalacArgs("-Ypartial-unification")
.withWarnings
.settings(libraryDependencies ++= Dependencies.mimir)
.settings(headerLicenseSettings)
.settings(publishSettings)
.settings(assemblySettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val niflheim = project.setup
.settings(name := "quasar-niflheim-internal")
.dependsOn(blueeyes % BothScopes, precog % BothScopes)
.scalacArgs("-Ypartial-unification")
.withWarnings
.settings(libraryDependencies ++= Dependencies.niflheim)
.settings(headerLicenseSettings)
.settings(publishSettings)
.settings(assemblySettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)
lazy val yggdrasil = project.setup
.settings(name := "quasar-yggdrasil-internal")
.dependsOn(blueeyes % BothScopes, precog % BothScopes, niflheim % BothScopes)
.withWarnings
.settings(
resolvers += "bintray-djspiewak-maven" at "https://dl.bintray.com/djspiewak/maven",
libraryDependencies ++= Dependencies.yggdrasil)
.settings(headerLicenseSettings)
.settings(publishSettings)
.settings(assemblySettings)
.settings(targetSettings)
.settings(excludeTypelevelScalaLibrary)
.enablePlugins(AutomateHeaderPlugin)