-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
69 lines (60 loc) · 2.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
// me.valik.spark %% spark-transformer-spatialjoin % 0.0.1
// me.valik.spark.transformer.BroadcastSpatialJoin
val Organization = "me.valik.spark"
val Name = "spark-transformer-spatialjoin"
val Version = "0.0.3-SNAPSHOT"
val ScalaVersion = "2.12.8"
val SparkVersion = "2.4.3"
val sparkDeps = Seq(
"org.apache.spark" %% "spark-mllib" % SparkVersion,
"org.apache.spark" %% "spark-core" % SparkVersion
)
val testDeps = Seq(
"org.scalatest" %% "scalatest" % "3.0.5",
"org.scalacheck" %% "scalacheck" % "1.14.0",
"com.holdenkarau" %% "spark-testing-base" % "2.4.3_0.12.0"
)
val spatialDeps = Seq(
"org.locationtech.jts" % "jts-core" % "1.16.1",
"net.sf.geographiclib" % "GeographicLib-Java" % "1.49"
)
val buildSettings = Seq(
organization := Organization,
name := Name,
version := Version,
scalaVersion := ScalaVersion,
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
javaOptions ++= Seq("-Xms512M", "-Xmx2048M", "-XX:+CMSClassUnloadingEnabled"),
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-encoding", "UTF-8"),
// elide assert and below
// sbt -Delide.below=2001 assembly
// elide WARNING end below
scalacOptions ++= Seq("-Xelide-below", sys.props.getOrElse("elide.below", "901")),
// assembly parameters
test in assembly := {},
assemblyOption in assembly := (assemblyOption in assembly).value.copy(
includeScala = false, includeDependency = true),
// temp lib fix, until spark-testing-base is ready for 2.12_2.4
assemblyMergeStrategy in assembly := {
case n if n.contains("holdenkarau") => MergeStrategy.discard
case x => (assemblyMergeStrategy in assembly).value(x)
}
)
resolvers ++= Seq(
"sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases/",
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
"Second Typesafe repo" at "http://repo.typesafe.com/typesafe/maven-releases/",
Resolver.sonatypeRepo("public")
)
// spark testing tuning
parallelExecution in Test := false
fork := true
concurrentRestrictions in Scope.Global += Tags.limit(Tags.Test, 1)
// project
lazy val root = (project in file(".")).settings(
buildSettings ++ Seq(
libraryDependencies ++= sparkDeps.map(_ % Provided)
++ spatialDeps
++ testDeps.map(_ % Test)
)
).dependsOn(Projects.spatialSpark)