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.

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