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.

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