u/Saphira2002

▲ 4 r/scala

sbt-assembly keys not available in project, even though assembly command works

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 :,)

reddit.com
u/Saphira2002 — 13 days ago

Second ever FO, first ever pair of socks!

Pattern: Rye Socks by TinCan Knits

Yarn: three cones of brown— two dark, one light— yarn bought from my LYS, held together. One of the dark browns says "Cofil srl", the others have no branding. The other dark brown is 70% wool 30% silk, while the two remaining are 100% wool.

I'm doneeeeeeee! This was fun, but I'm glad it's over haha. Messed up the heel turn on the second sock, and you can see one of the yarn tails because I wove it in wrong, but I'm so happy! Winter's gonna be a happier time this year!

u/Saphira2002 — 3 months ago