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.

100 lines
3.7 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. "fr.brouillard.oss" % "cssfx" % "11.4.0",
  44. "com.lihaoyi" %% "sourcecode" % "0.2.1",
  45. "eu.timepit" %% "refined" % "0.9.19",
  46. "org.scalatest" %% "scalatest" % "3.2.2" % "test"
  47. )
  48. scalacOptions ++= Seq(
  49. "-encoding",
  50. "UTF-8",
  51. "-deprecation",
  52. "-feature",
  53. "-language:existentials",
  54. "-language:experimental.macros",
  55. "-language:higherKinds",
  56. "-language:implicitConversions",
  57. "-unchecked",
  58. "-Xlint",
  59. "-Ywarn-numeric-widen",
  60. "-Ymacro-annotations",
  61. //silence warnings for by-name implicits
  62. "-Wconf:cat=lint-byname-implicit:s",
  63. //give errors on non exhaustive matches
  64. "-Wconf:msg=match may not be exhaustive:e",
  65. "-explaintypes" // Explain type errors in more detail.
  66. )
  67. javacOptions ++= Seq("-source", "11", "-target", "11")
  68. // Fork a new JVM for 'run' and 'test:run', to avoid JavaFX double initialization problems
  69. fork := true
  70. // Determine OS version of JavaFX binaries
  71. lazy val osName = System.getProperty("os.name") match {
  72. case n if n.startsWith("Linux") => "linux"
  73. case n if n.startsWith("Mac") => "mac"
  74. case n if n.startsWith("Windows") => "win"
  75. case _ => throw new Exception("Unknown platform!")
  76. }
  77. // Add JavaFX dependencies
  78. lazy val javaFXModules =
  79. Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
  80. libraryDependencies ++= javaFXModules.map(m =>
  81. "org.openjfx" % s"javafx-$m" % "14.0.1" classifier osName
  82. )
  83. addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
  84. ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.3"
  85. inThisBuild(
  86. List(
  87. scalaVersion := scalaVersion.value, // 2.11.12, or 2.13.3
  88. semanticdbEnabled := true, // enable SemanticDB
  89. semanticdbVersion := "4.4.2" // use Scalafix compatible version
  90. )
  91. )