You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.0 KiB

4 years ago
  1. // Name of the project
  2. name := "ScalaFX Hello World"
  3. // Project version
  4. version := "14-R19"
  5. // Version of Scala used by the project
  6. scalaVersion := "2.13.3"
  7. // Add dependency on ScalaFX library
  8. libraryDependencies += "org.scalafx" %% "scalafx" % "14-R19"
  9. resolvers += Resolver.sonatypeRepo("snapshots")
  10. enablePlugins(JavaFxPlugin)
  11. libraryDependencies ++= Seq(
  12. "org.typelevel" %% "cats-core" % "2.1.1",
  13. "org.typelevel" %% "cats-effect" % "2.1.4",
  14. "io.monix" %% "monix" % "3.2.2",
  15. "io.monix" %% "monix-bio" % "1.0.0",
  16. "io.circe" %% "circe-core" % "0.13.0",
  17. "io.circe" %% "circe-generic" % "0.13.0",
  18. "com.softwaremill.sttp.client" %% "core" % "2.2.5",
  19. "com.softwaremill.sttp.client" %% "monix" % "2.2.5",
  20. "com.softwaremill.sttp.client" %% "circe" % "2.2.5",
  21. "com.softwaremill.sttp.client" %% "async-http-client-backend-monix" % "2.2.5",
  22. "com.github.valskalla" %% "odin-monix" % "0.8.1",
  23. "com.typesafe.akka" %% "akka-actor-typed" % "2.6.8",
  24. "com.softwaremill.macwire" %% "util" % "2.3.7",
  25. "com.softwaremill.macwire" %% "macros" % "2.3.6" % "provided",
  26. "com.softwaremill.macwire" %% "macrosakka" % "2.3.6" % "provided",
  27. "com.github.valskalla" %% "odin-slf4j" % "0.8.1"
  28. )
  29. scalacOptions ++= Seq(
  30. "-unchecked",
  31. "-deprecation",
  32. "-Xcheckinit",
  33. "-encoding",
  34. "utf8",
  35. "-feature",
  36. "-Ywarn-unused:imports"
  37. )
  38. // Fork a new JVM for 'run' and 'test:run', to avoid JavaFX double initialization problems
  39. fork := true
  40. // Determine OS version of JavaFX binaries
  41. lazy val osName = System.getProperty("os.name") match {
  42. case n if n.startsWith("Linux") => "linux"
  43. case n if n.startsWith("Mac") => "mac"
  44. case n if n.startsWith("Windows") => "win"
  45. case _ => throw new Exception("Unknown platform!")
  46. }
  47. // Add JavaFX dependencies
  48. lazy val javaFXModules =
  49. Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
  50. libraryDependencies ++= javaFXModules.map(m =>
  51. "org.openjfx" % s"javafx-$m" % "14.0.1" classifier osName
  52. )