Closed jcallin closed 4 years ago
Not really. You can either copy-paste some portion of Assembly.apply
yourself, or maybe send a pull request to split apply
into two parts: input building and output building.
For anyone wondering, I ended up implementing a custom task that calls Assembly.applyStrategies
directly. It is usually called inside Assembly.apply
(used by the assembly
task) which then builds the jar. This excludes the jar building portion.
def verifyAssembly(key: TaskKey[File]) = Def.task {
val s = (streams in key).value
val assemblyOptions = (assemblyOption in key).value
Assembly.applyStrategies(
(assembledMappings in key).value,
assemblyOptions.mergeStrategy,
assemblyOptions.assemblyDirectory,
s.log
)
}
Hi, I'm looking into a way to verify that there are no classpath issues in a multi-project sbt build. Each project will eventually run the
assembly
task and build its own jar. Earlier in our build process, while verifying that a branch can be merged, it would be nice to run a task that does something similar to theapplyStrategies
function inAssembly.scala
. Is there a way to verify that no classpath issues exist without building the actual jar?