// Determine OS version of JavaFX binaries
lazy 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!")
}
lazy val javaFXModules = Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
libraryDependencies ++= javaFXModules.map( m =>
// with this the modules will NOT be included in the fat jar!
// "org.openjfx" % s"javafx-$m" % javaVersion % "provided" classifier osName
"org.openjfx" % s"javafx-$m" % javaVersion.toString classifier osName
)
assemblyMergeStrategy in assembly := {
case PathList("module-info.class", xs @ _*) => MergeStrategy.discard
case PathList("META-INF", "MANIFEST.MF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
}
mainClass in assembly := Some("TLCockpit.ApplicationMain")
assemblyJarName in assembly := "tlcockpit.jar"
assemblyOutputPath in assembly := file("jar/tlcockpit.jar")