简体   繁体   中英

Assembling only JVM part of a Scala.js CrossProject

I want to build a fatjar with the sbt assembly PlugIn.

How canI tell the assembly task to take only the JVM part of my project?

My build.sbt looks like this (I leave out some irrelevant parts):

val example = crossProject.settings(
scalaVersion := "2.11.7",
version := "0.1-SNAPSHOT"
).jsSettings(
   name := "Client"
).jvmSettings(
   Revolver.settings:_*
).jvmSettings(
   name := "Server"
)
val exampleJS = example.js
val exampleJVM = example.jvm.settings(
    (resources in Compile) += {
       (fastOptJS in (exampleJS, Compile)).value
        (artifactPath in (exampleJS, Compile, fastOptJS)).value
    }
)

正如sjrd指出的那样,简单的exampleJVM/assembly工作正常。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM