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.

103 lines
3.8 KiB

4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 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" % "15.0.1-R20"
  9. resolvers += Resolver.sonatypeRepo("snapshots")
  10. resolvers += "jitpack" at "https://jitpack.io"
  11. enablePlugins(JavaFxPlugin)
  12. libraryDependencies ++= Seq(
  13. "io.monix" %% "monix" % "3.4.0",
  14. "io.monix" %% "monix-bio" % "1.1.0",
  15. "io.circe" %% "circe-core" % "0.13.0",
  16. "io.circe" %% "circe-generic" % "0.13.0",
  17. "com.softwaremill.sttp.client" %% "core" % "2.2.9",
  18. "com.softwaremill.sttp.client" %% "monix" % "2.2.9",
  19. "com.softwaremill.sttp.client" %% "circe" % "2.2.9",
  20. "com.softwaremill.sttp.client" %% "httpclient-backend-monix" % "2.2.9",
  21. "com.softwaremill.quicklens" %% "quicklens" % "1.6.1",
  22. "com.typesafe.akka" %% "akka-actor-typed" % "2.6.8",
  23. // "com.softwaremill.macwire" %% "util" % "2.3.7",
  24. "com.softwaremill.common" %% "tagging" % "2.2.1",
  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. "com.github.rohan-sircar" % "scalafx-utils" % "0.15.0-SNAPSHOT",
  44. "fr.brouillard.oss" % "cssfx" % "11.4.0",
  45. "com.lihaoyi" %% "sourcecode" % "0.2.1",
  46. "eu.timepit" %% "refined" % "0.9.19",
  47. "org.scalatest" %% "scalatest" % "3.2.2" % "test",
  48. "uk.co.caprica" % "vlcj" % "4.7.0",
  49. "uk.co.caprica" % "vlcj-javafx" % "1.0.2"
  50. )
  51. scalacOptions ++= Seq(
  52. "-encoding",
  53. "UTF-8",
  54. "-deprecation",
  55. "-feature",
  56. "-language:existentials",
  57. "-language:experimental.macros",
  58. "-language:higherKinds",
  59. "-language:implicitConversions",
  60. "-unchecked",
  61. "-Xlint",
  62. "-Ywarn-numeric-widen",
  63. "-Ymacro-annotations",
  64. //silence warnings for by-name implicits
  65. "-Wconf:cat=lint-byname-implicit:s",
  66. //give errors on non exhaustive matches
  67. "-Wconf:msg=match may not be exhaustive:e",
  68. "-explaintypes" // Explain type errors in more detail.
  69. )
  70. javacOptions ++= Seq("-source", "11", "-target", "11")
  71. // Fork a new JVM for 'run' and 'test:run', to avoid JavaFX double initialization problems
  72. fork := true
  73. // Determine OS version of JavaFX binaries
  74. lazy val osName = System.getProperty("os.name") match {
  75. case n if n.startsWith("Linux") => "linux"
  76. case n if n.startsWith("Mac") => "mac"
  77. case n if n.startsWith("Windows") => "win"
  78. case _ => throw new Exception("Unknown platform!")
  79. }
  80. // Add JavaFX dependencies
  81. lazy val javaFXModules =
  82. Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
  83. libraryDependencies ++= javaFXModules.map(m =>
  84. "org.openjfx" % s"javafx-$m" % "14.0.1" classifier osName
  85. )
  86. addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
  87. ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.3"
  88. inThisBuild(
  89. List(
  90. scalaVersion := scalaVersion.value, // 2.11.12, or 2.13.3
  91. semanticdbEnabled := true, // enable SemanticDB
  92. semanticdbVersion := "4.4.2" // use Scalafix compatible version
  93. )
  94. )