jmonkey-test/build.sbt

180 lines
6.9 KiB
Plaintext
Raw Normal View History

2020-11-07 15:29:57 +00:00
scalaVersion := "2.13.3"
resolvers += "Jcenter" at "https://jcenter.bintray.com/"
resolvers += "JME Bintray" at "https://bintray.com/jmonkeyengine/com.jme3"
2020-11-26 05:10:31 +00:00
resolvers += "Jitpack" at "https://jitpack.io"
2020-11-07 15:29:57 +00:00
resolvers += Resolver.mavenLocal
resolvers += Resolver.sonatypeRepo("snapshots")
2021-02-27 06:06:32 +00:00
val jmeVersion = "3.3.2-stable"
2020-11-07 15:29:57 +00:00
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")
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",
2021-01-15 06:39:43 +00:00
"org.typelevel" %% "cats-core" % "2.3.0",
2020-11-07 15:29:57 +00:00
"com.lihaoyi" % "ammonite" % "2.2.0" cross CrossVersion.full,
"org.jetbrains.kotlin" % "kotlin-main-kts" % "1.4.10",
"org.jetbrains.kotlin" % "kotlin-scripting-jsr223" % "1.4.10",
2020-11-13 14:14:57 +00:00
"org.codehaus.groovy" % "groovy-all" % "3.0.6" pomOnly (),
2020-11-07 15:29:57 +00:00
"org.scalafx" %% "scalafx" % "14-R19",
"com.typesafe.akka" %% "akka-actor-typed" % "2.6.10",
2021-01-15 06:39:43 +00:00
"org.typelevel" %% "cats-core" % "2.3.0",
"org.typelevel" %% "cats-effect" % "2.3.0",
2020-11-07 15:29:57 +00:00
"io.monix" %% "monix" % "3.2.2",
2020-11-22 16:35:52 +00:00
"io.monix" %% "monix-bio" % "1.1.0",
2020-11-07 15:29:57 +00:00
"io.circe" %% "circe-core" % "0.13.0",
"io.circe" %% "circe-generic" % "0.13.0",
2021-01-16 13:20:32 +00:00
"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",
2020-11-07 15:29:57 +00:00
"com.github.valskalla" %% "odin-monix" % "0.8.1",
"com.github.valskalla" %% "odin-json" % "0.9.1",
2020-11-07 15:29:57 +00:00
"com.softwaremill.macwire" %% "util" % "2.3.7",
2020-11-26 05:10:31 +00:00
"com.softwaremill.macwire" %% "macros" % "2.3.7" % "provided",
2020-11-07 15:29:57 +00:00
"com.github.valskalla" %% "odin-slf4j" % "0.8.1",
2020-11-13 14:14:57 +00:00
"com.softwaremill.quicklens" %% "quicklens" % "1.6.1",
"org.scala-lang.modules" %% "scala-parallel-collections" % "1.0.0-RC1",
2020-11-21 14:34:25 +00:00
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
"io.circe" %% "circe-config" % "0.8.0",
2020-11-22 16:35:52 +00:00
"com.beachape" %% "enumeratum-circe" % "1.6.1",
2020-11-26 05:10:31 +00:00
"com.lihaoyi" %% "os-lib" % "0.7.1",
"com.badlogicgames.gdx" % "gdx-ai" % "1.8.2",
"org.recast4j" % "recast" % "1.2.5",
2021-01-10 06:11:39 +00:00
"org.recast4j" % "detour" % "1.2.5",
2021-01-15 06:39:43 +00:00
"com.lihaoyi" %% "pprint" % "0.6.0",
2021-01-20 06:50:20 +00:00
"org.scalatest" %% "scalatest" % "3.2.2" % "test",
"org.typelevel" %% "cats-mtl" % "1.1.1",
2021-01-30 08:28:42 +00:00
"io.estatico" %% "newtype" % "0.4.4",
2021-02-27 06:06:32 +00:00
"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"
2020-11-07 15:29:57 +00:00
),
// Determine OS version of JavaFX binaries
// Add JavaFX dependencies
libraryDependencies ++= javaFXModules.map(m =>
2021-02-27 06:06:32 +00:00
"org.openjfx" % s"javafx-$m" % "11.0.1" classifier osName
2020-11-07 15:29:57 +00:00
),
scalacOptions ++= Seq(
"-encoding",
"UTF-8",
"-deprecation",
"-feature",
2020-11-22 16:35:52 +00:00
"-language:existentials",
"-language:experimental.macros",
"-language:higherKinds",
"-language:implicitConversions",
2020-11-07 15:29:57 +00:00
"-unchecked",
"-Xlint",
"-Ywarn-numeric-widen",
"-Ymacro-annotations",
2020-11-22 16:35:52 +00:00
//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",
2020-11-07 15:29:57 +00:00
"-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)
}
)
2021-02-27 06:06:32 +00:00
// initialCommands in (console) := """ammonite.Main.main(Array.empty)"""
ammoniteVersion := "2.2.0"
2020-11-13 14:14:57 +00:00
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
2021-01-15 06:39:43 +00:00
addCompilerPlugin(
"org.typelevel" %% "kind-projector" % "0.11.1" cross CrossVersion.full
)
2021-01-20 06:50:20 +00:00
inThisBuild(
List(
scalaVersion := scalaVersion.value, // 2.11.12, or 2.13.3
semanticdbEnabled := true, // enable SemanticDB
semanticdbVersion := "4.3.24" // use Scalafix compatible version
)
)
2020-11-22 16:35:52 +00:00
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.3"
2021-02-27 06:06:32 +00:00
scalafixDependencies in ThisBuild += "org.scalalint" %% "rules" % "0.1.4"
// wartremoverErrors in (Compile, compile) ++= Warts.allBut(
// Wart.Any,
// Wart.Nothing,
// Wart.Serializable
// )
// wartremoverWarnings in (Compile, compile) ++= Seq(Wart.Any, Wart.Serializable)
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)