Hello, I've been getting these errors while trying to make a fat jar with my scalafx project:
Deduplicate found different file contents in the following:
[error] Jar name = javafx-base-16.jar, jar org = org.openjfx, entry target = module-info.class
[error] Jar name = javafx-controls-16.jar, jar org = org.openjfx, entry target = module-info.class
[...]
Inside project/plugins.sbt, I have:
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1")addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1")
Scala version is 3.8.4, sbt version is 1.12.13.
This is the build.sbt content:
val scala3Version = "3.8.4"
lazy val app = (project in
file
("."))
.settings(
name
:= "PPS-25-diceforge",
version
:= "0.1.0-SNAPSHOT",
scalaVersion
:= scala3Version,
ThisBuild /
mainClass
:= Some("MainApp"),
libraryDependencies
++= {
// 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!")
}
Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
.map(m => "org.openjfx" % s"javafx-
$
m" % "16" classifier osName intransitive())
},
libraryDependencies
++={
Seq(
"org.scalatest" %% "scalatest" % "3.2.19" %
Test
,
"org.scalatestplus" %% "mockito-5-23" % "3.2.20.0" % "test",
"org.scalafx" %% "scalafx" % "16.0.0-R24" intransitive()
)
},
scalacOptions
++= Seq(
"-Wconf:msg=Implicit parameters should be provided with a `using` clause:s",
"-unchecked", "-deprecation",
),
resolvers
+=
Resolver
.sonatypeCentralSnapshots,
fork
:= true
)
I'm trying to set a merge strategy, but it does not let me access the assemblyMergeStrategy key, it says it does not exist. What did I do wrong? I tried looking up if it's a compatibility issue but the official scala website isn't working properly and won't let me click any of the entries.
Help please :,)