-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
42 lines (31 loc) · 1.26 KB
/
build.sbt
File metadata and controls
42 lines (31 loc) · 1.26 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
name := "big-visualizer"
version := "0.1"
scalaVersion := "2.13.8"
scalacOptions += "-deprecation"
idePackagePrefix := Some("bigvis")
libraryDependencies ++= Seq(
"org.scalafx" %% "scalafx" % "16.0.0-R25",
"com.github.tototoshi" %% "scala-csv" % "1.3.8",
"de.siegmar" % "fastcsv" % "2.1.0",
"org.scalatest" %% "scalatest" % "3.2.0" % "test",
)
// JavaFX binary detection, from https://github.com/scalafx/ScalaFX-Tutorials/blob/master/hello-sbt/build.sbt
val javafxModules = Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
val osName = System.getProperty("os.name") match {
case n if n.startsWith("Linux") => "linux"
case n if n.startsWith("Mac") => "mac"
case n if n.startsWith("Windows") => "win"
case _ => throw new Exception("Unknown platform!")
}
libraryDependencies ++= javafxModules.map(m => "org.openjfx" % s"javafx-$m" % "16" classifier osName)
// Force hardware rendering
// TODO does this actually do anything?
run / javaOptions += "-Dsun.java2d.opengl=true"
run / javaOptions += "-Dprism.order=es2"
assembly / mainClass := Some("bigvis.Main")
assembly / assemblyMergeStrategy := {
case "module-info.class" => MergeStrategy.first
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}