Skip to content

Commit b64a22a

Browse files
committed
Infrastructure: Add JavaFX dependency for CodeMirror code tabs
1 parent bd261de commit b64a22a

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

build.sbt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ Compile / scalaSource := baseDirectory.value / "src" / "main"
1717
Test / scalaSource := baseDirectory.value / "src" / "test"
1818
scalacOptions ++= Seq("-deprecation", "-unchecked", "-Xfatal-warnings", "-encoding", "us-ascii", "-feature", "-release", "11", "-Wunused:linted")
1919

20+
lazy val osName = (System.getProperty("os.name"), System.getProperty("os.arch")) match {
21+
case (n, _) if n.startsWith("Linux") => "linux"
22+
case (n, arch) if n.startsWith("Mac") && arch == "aarch64" => "mac-aarch64"
23+
case (n, _) if n.startsWith("Mac") => "mac"
24+
case (n, _) if n.startsWith("Windows") => "win"
25+
case _ => throw new Exception("Unknown platform!")
26+
}
27+
2028
libraryDependencies ++= Seq(
2129
"com.google.guava" % "guava" % "18.0",
22-
"org.scala-lang.modules" %% "scala-parallel-collections" % "1.2.0"
30+
"org.scala-lang.modules" %% "scala-parallel-collections" % "1.2.0",
31+
"org.openjfx" % s"javafx-swing" % "21.0.6" classifier osName
2332
)

0 commit comments

Comments
 (0)