summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk11
blob: bf490132f5c011b72c4d1b9ee0c9e626d95673c3 (plain)
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
name := "tlcockpit"

version := "1.1"

scalaVersion := "2.12.7"

val javaVersion:Int = 11

libraryDependencies += "io.spray" %%  "spray-json" % "1.3.3"
libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.7.2"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
libraryDependencies += "org.json4s" %% "json4s-native" % "3.6.0-M3"
libraryDependencies += "org.json4s" %% "json4s-jackson" % "3.6.0-M3"

// Add dependency on ScalaFX library
// libraryDependencies += "org.scalafx" %% "scalafx" % "11-R16"
libraryDependencies += "org.scalafx" % "scalafx_2.12" % "12.0.1-R17"

lazy val root = (project in file(".")).
  enablePlugins(BuildInfoPlugin).
  settings(
    buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, BuildInfoKey(("javaVersion", javaVersion))),
    buildInfoPackage := "TLCockpit"
  )


// 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-jdk11.jar"
assemblyOutputPath in assembly := file("jar/tlcockpit-jdk11.jar")


// for scalafx
fork := true