scalaVersion := "2.13.3" resolvers += "Jcenter" at "https://jcenter.bintray.com/" resolvers += "JME Bintray" at "https://bintray.com/jmonkeyengine/com.jme3" resolvers += "Jitpack" at "https://jitpack.io" resolvers += Resolver.mavenLocal resolvers += Resolver.sonatypeRepo("snapshots") val jmeVersion = "3.3.2-stable" 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!") } lazy val javaFXModules = Seq("base", "controls", "fxml", "graphics", "media", "swing", "web") testFrameworks += new TestFramework("munit.Framework") lazy val root = (project in file(".")).settings( name := "mygame", organization := "wow.doge", version := "1.0-SNAPSHOT", libraryDependencies ++= Seq( "org.jmonkeyengine" % "jme3-core" % jmeVersion, "org.jmonkeyengine" % "jme3-desktop" % jmeVersion, "org.jmonkeyengine" % "jme3-lwjgl3" % jmeVersion, "org.jmonkeyengine" % "jme3-effects" % jmeVersion, "org.jmonkeyengine" % "jme3-plugins" % jmeVersion, "org.jmonkeyengine" % "jme3-blender" % jmeVersion, "com.github.stephengold" % "Minie" % "3.0.0", "com.simsilica" % "zay-es" % "1.2.1", "org.typelevel" %% "cats-core" % "2.3.0", "com.lihaoyi" % "ammonite" % "2.2.0" cross CrossVersion.full, // "com.lihaoyi" % "ammonite" % "2.3.8" % "test" cross CrossVersion.full, "org.jetbrains.kotlin" % "kotlin-main-kts" % "1.4.10", "org.jetbrains.kotlin" % "kotlin-scripting-jsr223" % "1.4.10", "org.codehaus.groovy" % "groovy-all" % "3.0.6" pomOnly (), "org.scalafx" %% "scalafx" % "14-R19", "com.typesafe.akka" %% "akka-actor-typed" % "2.6.10", "org.typelevel" %% "cats-core" % "2.3.0", "org.typelevel" %% "cats-effect" % "2.3.0", "io.monix" %% "monix" % "3.2.2", "io.monix" %% "monix-bio" % "1.1.0", "io.monix" %% "monix-nio" % "0.0.9", "io.circe" %% "circe-core" % "0.13.0", "io.circe" %% "circe-generic" % "0.13.0", "com.softwaremill.sttp.client3" %% "core" % "3.0.0", "com.softwaremill.sttp.client3" %% "monix" % "3.0.0", "com.softwaremill.sttp.client3" %% "circe" % "3.0.0", "com.softwaremill.sttp.client3" %% "async-http-client-backend-monix" % "3.0.0", "com.softwaremill.sttp.client3" %% "httpclient-backend-monix" % "3.0.0", "com.github.valskalla" %% "odin-monix" % "0.8.1", "com.github.valskalla" %% "odin-json" % "0.9.1", "com.softwaremill.macwire" %% "util" % "2.3.7", "com.softwaremill.macwire" %% "macros" % "2.3.7" % "provided", "com.github.valskalla" %% "odin-slf4j" % "0.8.1", "com.softwaremill.quicklens" %% "quicklens" % "1.6.1", "org.scala-lang.modules" %% "scala-parallel-collections" % "1.0.0-RC1", "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2", "io.circe" %% "circe-config" % "0.8.0", "com.beachape" %% "enumeratum-circe" % "1.6.1", "com.lihaoyi" %% "os-lib" % "0.7.1", "com.badlogicgames.gdx" % "gdx-ai" % "1.8.2", "org.recast4j" % "recast" % "1.2.5", "org.recast4j" % "detour" % "1.2.5", "com.lihaoyi" %% "pprint" % "0.6.0", "org.scalatest" %% "scalatest" % "3.2.2" % "test", "org.typelevel" %% "cats-mtl" % "1.1.1", "io.estatico" %% "newtype" % "0.4.4", "io.methvin" %% "directory-watcher-better-files" % "0.14.0", "com.github.rohan-sircar" % "scalafx-utils" % "0.15.0-SNAPSHOT", "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", "org.kordamp.bootstrapfx" % "bootstrapfx-core" % "0.4.0", "org.scalameta" %% "munit" % "0.7.23" % Test, "de.lolhens" %% "munit-tagless-final" % "0.0.1" % Test, "org.scalameta" %% "munit-scalacheck" % "0.7.23" % Test, "org.scalacheck" %% "scalacheck" % "1.15.3" % Test ), // Determine OS version of JavaFX binaries // Add JavaFX dependencies libraryDependencies ++= javaFXModules.map(m => "org.openjfx" % s"javafx-$m" % "11.0.1" classifier osName ), 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"), javaOptions ++= Seq("-Xmx2G", "-Xms2G"), fork := true, assemblyMergeStrategy in assembly := { case PathList("javax", "servlet", xs @ _*) => MergeStrategy.first case PathList(ps @ _*) if ps.last endsWith ".html" => MergeStrategy.first case "application.conf" => MergeStrategy.concat case "unwanted.txt" => MergeStrategy.discard case x if Assembly.isConfigFile(x) => MergeStrategy.concat case PathList("META-INF", xs @ _*) => (xs map { _.toLowerCase }) match { case ("manifest.mf" :: Nil) | ("index.list" :: Nil) | ("dependencies" :: Nil) => MergeStrategy.discard case ps @ (x :: xs) if ps.last.endsWith(".sf") || ps.last.endsWith(".dsa") => MergeStrategy.discard case "plexus" :: xs => MergeStrategy.discard case "services" :: xs => MergeStrategy.filterDistinctLines case ("spring.schemas" :: Nil) | ("spring.handlers" :: Nil) => MergeStrategy.filterDistinctLines case _ => MergeStrategy.first // Changed deduplicate to first } case PathList(_*) => MergeStrategy.first // case x => // val oldStrategy = (assemblyMergeStrategy in assembly).value // oldStrategy(x) } ) // initialCommands in (console) := """ammonite.Main.main(Array.empty)""" ammoniteVersion := "2.2.0" addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1") addCompilerPlugin( "org.typelevel" %% "kind-projector" % "0.11.1" cross CrossVersion.full ) inThisBuild( List( scalaVersion := scalaVersion.value, // 2.11.12, or 2.13.3 semanticdbEnabled := true, // enable SemanticDB semanticdbVersion := "4.4.10" // use Scalafix compatible version ) ) ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.3" scalafixDependencies in ThisBuild += "org.scalalint" %% "rules" % "0.1.4" wartremoverErrors in (Compile, compile) ++= Warts.allBut( Wart.Any, Wart.NonUnitStatements, // Wart.StringPlusAny, Wart.Overloading, Wart.PublicInference, Wart.Nothing, Wart.Var, Wart.DefaultArguments, // Wart.MutableDataStructures, Wart.ImplicitConversion, Wart.ImplicitParameter, Wart.ToString, Wart.Recursion, Wart.While, Wart.ExplicitImplicitTypes, Wart.ListUnapply ) // Seq(Wart.FinalCaseClass)