-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sc
49 lines (38 loc) · 1.18 KB
/
build.sc
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
import mill._, scalalib._
import mill.modules.Assembly
object Deps {
val SPARK_VERSION = "3.1.2"
}
object olist extends ScalaModule { outer =>
import Deps._
def scalaVersion = "2.12.15"
def scalacOptions =
Seq("-encoding", "utf-8", "-explaintypes", "-feature", "-deprecation")
def ivySparkDeps = Agg(
ivy"org.apache.spark::spark-sql:${SPARK_VERSION}"
.exclude("org.slf4j" -> "slf4j-log4j12")
.exclude("org.apache.spark.sql." -> "execution.datasources.v2"),
ivy"org.slf4j:slf4j-api:1.7.16",
ivy"org.slf4j:slf4j-log4j12:1.7.16"
)
def ivyDeps = Agg(
ivy"com.lihaoyi::upickle:0.9.7",
ivy"io.getquill::quill-spark:3.9.0"
)
override def mainClass = T { Some("OlistCli") }
def compileIvyDeps = ivySparkDeps
def assemblyRules =
Assembly.defaultRules ++
Seq(
"scala/.*",
"org.slf4j.*",
"org.apache.log4j.*"
).map(Assembly.Rule.ExcludePattern.apply)
object standalone extends ScalaModule {
def scalaVersion = outer.scalaVersion
def moduleDeps = Seq(outer)
def ivyDeps = outer.ivySparkDeps
override def mainClass = outer.mainClass
def forkArgs = Seq("-Dspark.master=local[*]")
}
}