// Name of the project name := "ScalaFX Hello World" // Project version version := "14-R19" // Version of Scala used by the project scalaVersion := "2.13.4" // Add dependency on ScalaFX library libraryDependencies += "org.scalafx" %% "scalafx" % "15.0.1-R20" resolvers += Resolver.sonatypeRepo("snapshots") resolvers += "jitpack" at "https://jitpack.io" enablePlugins(JavaFxPlugin) libraryDependencies ++= Seq( "org.typelevel" %% "cats-core" % "2.2.0", "org.typelevel" %% "cats-effect" % "2.2.0", "io.monix" %% "monix" % "3.3.0", "io.monix" %% "monix-bio" % "1.1.0", "io.circe" %% "circe-core" % "0.13.0", "io.circe" %% "circe-generic" % "0.13.0", "com.softwaremill.sttp.client" %% "core" % "2.2.9", "com.softwaremill.sttp.client" %% "monix" % "2.2.9", "com.softwaremill.sttp.client" %% "circe" % "2.2.9", "com.softwaremill.sttp.client" %% "httpclient-backend-monix" % "2.2.9", "com.softwaremill.quicklens" %% "quicklens" % "1.6.1", "com.typesafe.akka" %% "akka-actor-typed" % "2.6.8", // "com.softwaremill.macwire" %% "util" % "2.3.7", "com.softwaremill.common" %% "tagging" % "2.2.1", "com.softwaremill.macwire" %% "macros" % "2.3.6" % "provided", "com.softwaremill.macwire" %% "macrosakka" % "2.3.6" % "provided", "com.github.valskalla" %% "odin-monix" % "0.9.1", "com.github.valskalla" %% "odin-slf4j" % "0.9.1", "com.github.valskalla" %% "odin-json" % "0.9.1", "com.github.valskalla" %% "odin-extras" % "0.9.1", "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2", "com.jfoenix" % "jfoenix" % "9.0.10", "com.lihaoyi" %% "os-lib" % "0.7.1", "org.kordamp.ikonli" % "ikonli-core" % "12.0.0", "org.kordamp.ikonli" % "ikonli-javafx" % "12.0.0", "org.kordamp.ikonli" % "ikonli-fontawesome5-pack" % "12.0.0", "org.kordamp.ikonli" % "ikonli-material-pack" % "12.0.0", "org.kordamp.bootstrapfx" % "bootstrapfx-core" % "0.4.0", "io.github.typhon0" % "AnimateFX" % "1.2.1", "com.beachape" %% "enumeratum" % "1.6.1", "com.chuusai" %% "shapeless" % "2.3.3", // "org.gerweck.scalafx" %% "scalafx-utils" % "0.15.0", "com.github.rohan-sircar" % "scalafx-utils" % "0.15.0-SNAPSHOT", "fr.brouillard.oss" % "cssfx" % "11.4.0", "com.lihaoyi" %% "sourcecode" % "0.2.1", "eu.timepit" %% "refined" % "0.9.19", "org.scalatest" %% "scalatest" % "3.2.2" % "test", "uk.co.caprica" % "vlcj" % "4.7.0", "uk.co.caprica" % "vlcj-javafx" % "1.0.2" ) scalacOptions ++= Seq( "-encoding", "UTF-8", "-deprecation", "-feature", "-language:existentials", "-language:experimental.macros", "-language:higherKinds", "-language:implicitConversions", "-unchecked", "-Xlint", "-Ywarn-numeric-widen", "-Ymacro-annotations", //silence warnings for by-name implicits "-Wconf:cat=lint-byname-implicit:s", //give errors on non exhaustive matches "-Wconf:msg=match may not be exhaustive:e", "-explaintypes" // Explain type errors in more detail. ) javacOptions ++= Seq("-source", "11", "-target", "11") // Fork a new JVM for 'run' and 'test:run', to avoid JavaFX double initialization problems fork := true // Determine OS version of JavaFX binaries lazy val osName = System.getProperty("os.name") match { case n if n.startsWith("Linux") => "linux" case n if n.startsWith("Mac") => "mac" case n if n.startsWith("Windows") => "win" case _ => throw new Exception("Unknown platform!") } // Add JavaFX dependencies lazy val javaFXModules = Seq("base", "controls", "fxml", "graphics", "media", "swing", "web") libraryDependencies ++= javaFXModules.map(m => "org.openjfx" % s"javafx-$m" % "14.0.1" classifier osName ) addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1") ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.3" inThisBuild( List( scalaVersion := scalaVersion.value, // 2.11.12, or 2.13.3 semanticdbEnabled := true, // enable SemanticDB semanticdbVersion := "4.4.2" // use Scalafix compatible version ) )