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.

93 lines
3.4 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
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.4"
  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.1.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.9",
  19. "com.softwaremill.sttp.client" %% "monix" % "2.2.9",
  20. "com.softwaremill.sttp.client" %% "circe" % "2.2.9",
  21. "com.softwaremill.sttp.client" %% "async-http-client-backend-monix" % "2.2.9",
  22. "com.softwaremill.sttp.client" %% "httpclient-backend-monix" % "2.2.9",
  23. "com.github.valskalla" %% "odin-monix" % "0.8.1",
  24. "com.typesafe.akka" %% "akka-actor-typed" % "2.6.8",
  25. "com.softwaremill.macwire" %% "util" % "2.3.7",
  26. "com.softwaremill.macwire" %% "macros" % "2.3.6" % "provided",
  27. "com.softwaremill.macwire" %% "macrosakka" % "2.3.6" % "provided",
  28. "com.github.valskalla" %% "odin-slf4j" % "0.8.1",
  29. "com.github.valskalla" %% "odin-json" % "0.9.1",
  30. "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
  31. "com.jfoenix" % "jfoenix" % "9.0.10",
  32. "org.kordamp.ikonli" % "ikonli-core" % "12.0.0",
  33. "org.kordamp.ikonli" % "ikonli-javafx" % "12.0.0",
  34. "org.kordamp.ikonli" % "ikonli-fontawesome5-pack" % "12.0.0",
  35. "org.kordamp.ikonli" % "ikonli-material-pack" % "12.0.0",
  36. "io.github.typhon0" % "AnimateFX" % "1.2.1",
  37. "com.beachape" %% "enumeratum" % "1.6.1",
  38. "com.chuusai" %% "shapeless" % "2.3.3",
  39. "org.gerweck.scalafx" %% "scalafx-utils" % "0.15.0"
  40. )
  41. scalacOptions ++= Seq(
  42. "-encoding",
  43. "UTF-8",
  44. "-deprecation",
  45. "-feature",
  46. "-language:existentials",
  47. "-language:experimental.macros",
  48. "-language:higherKinds",
  49. "-language:implicitConversions",
  50. "-unchecked",
  51. "-Xlint",
  52. "-Ywarn-numeric-widen",
  53. "-Ymacro-annotations",
  54. //silence warnings for by-name implicits
  55. "-Wconf:cat=lint-byname-implicit:s",
  56. //give errors on non exhaustive matches
  57. "-Wconf:msg=match may not be exhaustive:e",
  58. "-explaintypes" // Explain type errors in more detail.
  59. )
  60. javacOptions ++= Seq("-source", "11", "-target", "11")
  61. // Fork a new JVM for 'run' and 'test:run', to avoid JavaFX double initialization problems
  62. fork := true
  63. // Determine OS version of JavaFX binaries
  64. lazy val osName = System.getProperty("os.name") match {
  65. case n if n.startsWith("Linux") => "linux"
  66. case n if n.startsWith("Mac") => "mac"
  67. case n if n.startsWith("Windows") => "win"
  68. case _ => throw new Exception("Unknown platform!")
  69. }
  70. // Add JavaFX dependencies
  71. lazy val javaFXModules =
  72. Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
  73. libraryDependencies ++= javaFXModules.map(m =>
  74. "org.openjfx" % s"javafx-$m" % "14.0.1" classifier osName
  75. )
  76. addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
  77. ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.3"
  78. inThisBuild(
  79. List(
  80. scalaVersion := scalaVersion.value, // 2.11.12, or 2.13.3
  81. semanticdbEnabled := true, // enable SemanticDB
  82. semanticdbVersion := "4.4.2" // use Scalafix compatible version
  83. )
  84. )