-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sbt
86 lines (65 loc) · 2.65 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
ThisBuild / crossScalaVersions := Seq("2.12.11")
ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.head
ThisBuild / githubRepository := "quasar-plugin-avalanche"
ThisBuild / homepage := Some(url("https://github.com/precog/quasar-plugin-avalanche"))
ThisBuild / scmInfo := Some(ScmInfo(
url("https://github.com/precog/quasar-plugin-avalanche"),
"scm:[email protected]:precog/quasar-plugin-avalanche.git"))
ThisBuild / publishAsOSSProject := true
lazy val quasarVersion =
Def.setting[String](managedVersions.value("precog-quasar"))
lazy val quasarPluginJdbcVersion =
Def.setting[String](managedVersions.value("precog-quasar-lib-jdbc"))
val Specs2Version = "4.9.4"
// Include to also publish a project's tests
lazy val publishTestsSettings = Seq(
Test / packageBin / publishArtifact := true)
lazy val root = project
.in(file("."))
.settings(noPublishSettings)
.aggregate(core, datasource)
lazy val core = project
.in(file("core"))
.settings(
name := "quasar-plugin-avalanche",
libraryDependencies ++= Seq(
"com.precog" %% "quasar-lib-jdbc" % quasarPluginJdbcVersion.value,
"org.specs2" %% "specs2-core" % Specs2Version % Test
),
// FIXME: how do we include this without assembly?
// Assemble a "fat" jar consisting of the plugin and the unmanaged iijdbc.jar
assemblyExcludedJars in assembly := {
val cp = (fullClasspath in assembly).value
cp.filter(_.data.getName != "iijdbc.jar")
},
packageBin in Compile := (assembly in Compile).value)
lazy val datasource = project
.in(file("datasource"))
.dependsOn(core)
.settings(
name := "quasar-datasource-avalanche",
initialCommands in console := """
import slamdata.Predef._
import doobie._
import doobie.implicits._
import doobie.util.ExecutionContexts
import cats._
import cats.data._
import cats.effect._
import cats.implicits._
implicit val contextShiftIO = IO.contextShift(ExecutionContexts.synchronous)
val syncBlocker = Blocker.liftExecutionContext(ExecutionContexts.synchronous)
""",
quasarPluginName := "avalanche",
quasarPluginQuasarVersion := quasarVersion.value,
quasarPluginDatasourceFqcn := Some("quasar.plugin.avalanche.datasource.AvalancheDatasourceModule$"),
quasarPluginDependencies ++= Seq(
"com.precog" %% "quasar-lib-jdbc" % quasarPluginJdbcVersion.value
),
libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % Specs2Version % Test
))
.enablePlugins(QuasarPlugin)
.evictToLocal("QUASAR_PATH", "connector", true)
.evictToLocal("QUASAR_PATH", "api", true)
.evictToLocal("QUASAR_LIB_JDBC_PATH", "core", true)