-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sbt
More file actions
123 lines (108 loc) · 3.64 KB
/
Copy pathbuild.sbt
File metadata and controls
123 lines (108 loc) · 3.64 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
import sbt.Keys.libraryDependencies
name := "BondoraCreditRiskPrevision"
ThisBuild / version := "0.1"
ThisBuild / scalaVersion := "2.11.12"
lazy val global = (project in file("."))
.settings(commonSettings)
.disablePlugins(AssemblyPlugin)
.aggregate(
core,
emr,
ec2
)
lazy val core = (project in file("core"))
.disablePlugins(AssemblyPlugin)
.settings(
name := "core",
commonSettings,
libraryDependencies ++= commonDependencies
)
lazy val emr = (project in file("emr"))
.settings(
name := "emr",
commonSettings,
libraryDependencies ++= commonDependencies,
mainClass in assembly := Some("Main")
)
.dependsOn(
core
)
lazy val ec2 = (project in file("ec2"))
.settings(
name := "ec2",
commonSettings,
libraryDependencies ++= commonDependencies ++ Seq(
dependencies.sttpcore,
dependencies.sttpcirce,
dependencies.circegeneric,
dependencies.akkastream,
dependencies.akkaactor,
dependencies.akkahttp
) ++ testDependencies,
mainClass in assembly := Some("Main")
)
.dependsOn(
core
)
lazy val dependencies =
new {
val circeVersion = "0.11.1"
val sparkVersion = "2.4.4"
val sttpVersion = "2.0.0-M1"
val mleapVersion = "0.15.0"
val scalacticVersion = "3.1.0"
val akkaVersion = "2.5.29"
val sparkstreaming = "org.apache.spark" %% "spark-streaming" % sparkVersion % "provided"
val sparkcore = "org.apache.spark" %% "spark-core" % sparkVersion % "provided"
val sparksql = "org.apache.spark" %% "spark-sql" % sparkVersion % "provided"
val sparkmllib = "org.apache.spark" %% "spark-mllib" % sparkVersion % "provided"
val sttpcore = "com.softwaremill.sttp.client" %% "core" % sttpVersion
val sttpcirce = "com.softwaremill.sttp.client" %% "circe" % sttpVersion
val mleapspark = "ml.combust.mleap" %% "mleap-spark" % mleapVersion exclude("org.spark-project.spark", "unused")
val mleapruntime = "ml.combust.mleap" %% "mleap-runtime" % mleapVersion exclude("org.spark-project.spark", "unused")
val circegeneric = "io.circe" %% "circe-generic" % circeVersion
val scalactic = "org.scalactic" %% "scalactic" % scalacticVersion
val scalatest = "org.scalatest" %% "scalatest" % scalacticVersion % Test
val scalamock = "org.scalamock" %% "scalamock" % "4.4.0" % Test
val akkastream = "com.typesafe.akka" %% "akka-stream" % akkaVersion
val akkaactor = "com.typesafe.akka" %% "akka-actor" % akkaVersion
val akkahttp = "com.typesafe.akka" %% "akka-http" % "10.1.11"
}
lazy val commonDependencies = Seq(
dependencies.sparkstreaming,
dependencies.sparkcore,
dependencies.sparksql,
dependencies.sparkmllib,
dependencies.mleapspark,
dependencies.mleapruntime
)
lazy val testDependencies = Seq(
dependencies.scalatest,
dependencies.scalactic,
dependencies.scalamock
)
lazy val commonSettings = Seq(
licenses := apacheLicense,
scalacOptions ++= compilerOptions,
Compile / scalaSource := baseDirectory.value / "src" / "main" / "scala",
assemblyJarName in assembly := s"${name.value}-assembly-${version.value}.jar",
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
Test / javaSource := baseDirectory.value / "src" / "test" / "scala",
test in assembly := {}
)
lazy val compilerOptions = Seq(
"-deprecation",
"-encoding",
"utf-8",
"-feature",
"-language:existentials",
"-language:experimental.macros",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xcheckinit",
"-Xfatal-warnings",
"-Xfuture",
"-Xlint"
)
lazy val apacheLicense = Seq("The Apache Software License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))