2020-08-27 14:28:18 +00:00
|
|
|
// Name of the project
|
|
|
|
name := "ScalaFX Hello World"
|
|
|
|
|
|
|
|
// Project version
|
|
|
|
version := "14-R19"
|
|
|
|
|
|
|
|
// Version of Scala used by the project
|
2020-12-15 07:21:25 +00:00
|
|
|
scalaVersion := "2.13.4"
|
2020-08-27 14:28:18 +00:00
|
|
|
|
|
|
|
// Add dependency on ScalaFX library
|
|
|
|
libraryDependencies += "org.scalafx" %% "scalafx" % "14-R19"
|
|
|
|
resolvers += Resolver.sonatypeRepo("snapshots")
|
|
|
|
|
|
|
|
enablePlugins(JavaFxPlugin)
|
|
|
|
|
|
|
|
libraryDependencies ++= Seq(
|
|
|
|
"org.typelevel" %% "cats-core" % "2.1.1",
|
|
|
|
"org.typelevel" %% "cats-effect" % "2.1.4",
|
2020-12-17 06:48:16 +00:00
|
|
|
"io.monix" %% "monix" % "3.3.0",
|
2020-12-15 07:21:25 +00:00
|
|
|
"io.monix" %% "monix-bio" % "1.1.0",
|
2020-08-27 14:28:18 +00:00
|
|
|
"io.circe" %% "circe-core" % "0.13.0",
|
|
|
|
"io.circe" %% "circe-generic" % "0.13.0",
|
2020-12-15 07:21:25 +00:00
|
|
|
"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" %% "async-http-client-backend-monix" % "2.2.9",
|
|
|
|
"com.softwaremill.sttp.client" %% "httpclient-backend-monix" % "2.2.9",
|
2020-12-16 12:02:19 +00:00
|
|
|
"com.softwaremill.quicklens" %% "quicklens" % "1.6.1",
|
2020-08-27 14:28:18 +00:00
|
|
|
"com.github.valskalla" %% "odin-monix" % "0.8.1",
|
|
|
|
"com.typesafe.akka" %% "akka-actor-typed" % "2.6.8",
|
|
|
|
"com.softwaremill.macwire" %% "util" % "2.3.7",
|
|
|
|
"com.softwaremill.macwire" %% "macros" % "2.3.6" % "provided",
|
|
|
|
"com.softwaremill.macwire" %% "macrosakka" % "2.3.6" % "provided",
|
2020-12-15 07:21:25 +00:00
|
|
|
"com.github.valskalla" %% "odin-slf4j" % "0.8.1",
|
|
|
|
"com.github.valskalla" %% "odin-json" % "0.9.1",
|
|
|
|
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
|
|
|
|
"com.jfoenix" % "jfoenix" % "9.0.10",
|
|
|
|
"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",
|
|
|
|
"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"
|
2020-08-27 14:28:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
scalacOptions ++= Seq(
|
|
|
|
"-encoding",
|
2020-12-15 07:21:25 +00:00
|
|
|
"UTF-8",
|
|
|
|
"-deprecation",
|
2020-08-27 14:28:18 +00:00
|
|
|
"-feature",
|
2020-12-15 07:21:25 +00:00
|
|
|
"-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.
|
2020-08-27 14:28:18 +00:00
|
|
|
)
|
2020-12-15 07:21:25 +00:00
|
|
|
javacOptions ++= Seq("-source", "11", "-target", "11")
|
2020-08-27 14:28:18 +00:00
|
|
|
|
|
|
|
// 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
|
|
|
|
)
|
2020-12-15 07:21:25 +00:00
|
|
|
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
|
|
|
|
)
|
|
|
|
)
|