-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
124 lines (108 loc) · 3.52 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
lazy val `spark-challenges` =
project
.in(file("."))
.enablePlugins(AutomateHeaderPlugin, GitVersioning, JavaAppPackaging, AshScriptPlugin)
.settings(name := "spark-challenges")
.settings(settings)
.settings(dockerSettings)
.settings(
libraryDependencies ++= dependencies,
Docker / version := "0.1.0-SNAPSHOT"
)
// *****************************************************************************
// Library dependencies
// *****************************************************************************
lazy val library =
new {
object Version {
val sparkVersion = "3.3.0"
val sparkTestingBase = "3.3.0_1.2.0"
val log4j2 = "2.19.0"
val slf4j = "2.0.3"
val scalaCheck = "1.17.0"
val specs2 = "4.17.0"
val reflect = "2.13.10"
}
// Spark Stuff
val sparkSQL = "org.apache.spark" %% "spark-sql" % Version.sparkVersion
val sparkTestingBase = "com.holdenkarau" %% "spark-testing-base" % Version.sparkTestingBase
val slf4jAPI = "org.slf4j" % "slf4j-api" % Version.slf4j
val slf4jNOP = "org.slf4j" % "slf4j-nop" % Version.slf4j
val slf4jBinding = "org.slf4j" % "slf4j-log4j12" % Version.slf4j
val log4j2Api = "org.apache.logging.log4j" % "log4j-api" % Version.log4j2
val log4j2Core = "org.apache.logging.log4j" % "log4j-core" % Version.log4j2
val slf4j = "org.apache.logging.log4j" % "log4j-slf4j-impl" % Version.slf4j
val scalaCheck = "org.scalacheck" %% "scalacheck" % Version.scalaCheck
val specs2 = "org.specs2" %% "specs2-core" % Version.specs2
val specs2Mock = "org.specs2" %% "specs2-mock" % Version.specs2
val reflect = "org.scala-lang" % "scala-reflect" % Version.reflect
}
// *****************************************************************************
// Settings
// *****************************************************************************
lazy val settings =
commonSettings ++
gitSettings ++
scalafmtSettings
lazy val commonSettings =
Seq(
scalaVersion := "2.12.12",
version := "0.1.0-SNAPSHOT",
organization := "com.codingmaniacs.courses",
headerLicense := Some(HeaderLicense.MIT("2020", "Geektimus")),
scalacOptions ++= Seq(
"-deprecation",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps",
"-target:jvm-1.8",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ypartial-unification",
"-Ywarn-dead-code",
"-Ywarn-infer-any",
"-Ywarn-numeric-widen",
"-Ywarn-unused",
"-Ywarn-unused-import",
"-Ywarn-value-discard"
),
Test / parallelExecution := false,
Compile / unmanagedSourceDirectories := Seq((Compile / scalaSource).value),
Test / unmanagedSourceDirectories := Seq((Test / scalaSource).value)
)
lazy val dependencies =
Seq(
library.sparkSQL % Provided,
library.sparkTestingBase % Test
) ++
Seq(
library.slf4jAPI % Provided,
library.slf4jBinding % Provided,
library.slf4jNOP % Test,
// library.log4j2Api,
// library.log4j2Core
) ++
Seq(
library.scalaCheck % Test,
library.specs2 % Test,
library.specs2Mock % Test
)
lazy val dockerSettings =
Seq(
dockerBaseImage := "openjdk:8-jdk-alpine",
dockerUpdateLatest := true
)
lazy val gitSettings =
Seq(
git.useGitDescribe := true
)
lazy val scalafmtSettings =
Seq(
scalafmtOnCompile := true
)