-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
70 lines (60 loc) · 3.07 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
val scala2Version = "2.13.13"
val scala3Version = "3.5.1"
lazy val root = project
.in(file("."))
.settings(
name := "scala3-cross",
version := "0.1.0",
// format: off
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test,
libraryDependencySchemes += "com.github.luben" % "zstd-jni" % VersionScheme.Always,
libraryDependencies += "org.apache.hadoop" % "hadoop-client-api" % "3.3.4",
libraryDependencies += "org.apache.hadoop" % "hadoop-client-runtime" % "3.3.4",
libraryDependencies += ("org.apache.spark" %% "spark-core" % "3.5.3").cross(CrossVersion.for3Use2_13),
libraryDependencies += ("org.apache.spark" %% "spark-sql" % "3.5.3").cross(CrossVersion.for3Use2_13),
libraryDependencies += ("org.apache.spark" %% "spark-streaming-kafka-0-10" % "3.5.3").cross(CrossVersion.for3Use2_13),
libraryDependencies += ("org.apache.spark" %% "spark-sql-kafka-0-10" % "3.5.3").cross(CrossVersion.for3Use2_13),
libraryDependencies += ("org.scalikejdbc" % "scalikejdbc" % "4.3.2").cross(CrossVersion.for3Use2_13),
libraryDependencies += ("org.apache.kafka" %% "kafka" % "3.8.0").cross(CrossVersion.for3Use2_13),
libraryDependencies += "redis.clients" % "jedis" % "5.2.0",
libraryDependencies += "com.mysql" % "mysql-connector-j" % "9.0.0",
// format: on
// To make the default compiler and REPL use Dotty
scalaVersion := scala3Version,
// To cross compile with Scala 3 and Scala 2
crossScalaVersions := Seq(scala3Version, scala2Version)
)
Global / onChangedBuildSource := ReloadOnSourceChanges
// NOTE: Scalafix linter (Enables support for Scala 3)
// https://github.com/dedis/scapegoat-scalafix
ThisBuild / scalafixDependencies += "io.github.dedis" %% "scapegoat-scalafix" % "1.1.3"
inThisBuild(
List(
scalaVersion := "3.5.1",
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
)
// NOTE: Forking is necessary due to addition of javaOptions in runtime when running in JDK 17
// https://stackoverflow.com/questions/78700208/symbolic-reference-class-is-not-accessible-class-sun-util-calendar-zoneinfo-fr
fork := true
javaOptions ++= Seq(
"-XX:+IgnoreUnrecognizedVMOptions",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.lang.invoke=ALL-UNNAMED",
"--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
"--add-opens=java.base/java.io=ALL-UNNAMED",
"--add-opens=java.base/java.net=ALL-UNNAMED",
"--add-opens=java.base/java.nio=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED",
"--add-opens=java.base/java.util.concurrent=ALL-UNNAMED",
"--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED",
"--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED",
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens=java.base/sun.nio.cs=ALL-UNNAMED",
"--add-opens=java.base/sun.security.action=ALL-UNNAMED",
"--add-opens=java.base/sun.util.calendar=ALL-UNNAMED",
"--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED",
"-Djdk.reflect.useDirectMethodHandle=false",
"-Dio.netty.tryReflectionSetAccessible=true"
)