This repository has been archived by the owner on Dec 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sbt
executable file
·88 lines (77 loc) · 2.83 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
import quark.project._, build._
import java.lang.Integer
import scala.{Predef, Seq, Some, sys}, Predef.assert
import sbt._, Keys._
import sbt.TestFrameworks.Specs2
import scoverage.ScoverageKeys
lazy val buildSettings = Seq(
organization := "com.slamdata",
scalaVersion := "2.11.8",
scalaOrganization := "org.typelevel",
initialize :=
assert(
Integer.parseInt(sys.props("java.specification.version").split("\\.")(1)) >= 8,
"Java 8 or above required")
)
lazy val baseSettings = Seq(
scalacOptions ++= BuildInfo.commonScalacOptions ++ Seq(
"-target:jvm-1.8",
"-Ybackend:GenBCode",
"-Ydelambdafy:method",
"-Ypartial-unification",
"-Yliteral-types",
"-Ywarn-unused-import"),
scalacOptions in (Test, console) --= Seq(
"-Yno-imports",
"-Ywarn-unused-import"),
scalacOptions in (Compile, doc) -= "-Xfatal-warnings",
testOptions in (Test) += Tests.Argument(Specs2, "showtimes", "true"),
console <<= console in Test,
wartremoverErrors in (Compile, compile) ++= warts,
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots"),
"MarkLogic" at "http://developer.marklogic.com/maven2"),
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.0"),
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full),
ScoverageKeys.coverageHighlighting := true,
exportJars := true
)
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("com", "google", "common", "base", xs @ _*) => MergeStrategy.last
case other => (assemblyMergeStrategy in assembly).value apply other
}
)
// TODO: sync up wth quasar
val warts = Warts.allBut(
Wart.Any,
Wart.AsInstanceOf,
Wart.ExplicitImplicitTypes, // - see puffnfresh/wartremover#226
Wart.ImplicitConversion, // - see puffnfresh/wartremover#242
Wart.IsInstanceOf,
Wart.NoNeedForMonad, // - see puffnfresh/wartremover#159
Wart.Nothing,
Wart.Overloading,
Wart.Product, // _ these two are highly correlated
Wart.Serializable, // /
Wart.ToString)
lazy val commonSettings = buildSettings ++ baseSettings ++ assemblySettings
lazy val core = (project in file("core"))
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings)
.settings(
libraryDependencies ++= dependencies.core,
fork in run := true,
connectInput in run := true,
outputStrategy := Some(StdoutOutput),
buildInfoKeys := Seq[BuildInfoKey](version, ScoverageKeys.coverageEnabled),
buildInfoPackage := "quasar.advanced.build"
)
lazy val root = (project in file("."))
.aggregate(core)
.dependsOn(core)
.settings(commonSettings)