Releases: sbt/sbt-assembly
2.3.0
sbt-assembly 2.3.0 is cross published to:
sbt Version | Published |
---|---|
1.x | ✅ |
2.0.0-M2 | ✅ |
Note: Shading on sbt 2.0.0-M2 requires setting exportJars := false
.
sbt 2.x migration
- Cross build to sbt 2.x by @eed3si9n in #533
- refactor: Uses new slash syntax by @xuwei-k in #531
- refactor: Update the types by @eed3si9n in #535
updates
- fix: Fixes assembly not creating parent directories by @Roiocam in #525
- fix: Throws error when a misconfigured
assemblyOutputPath
is detected by @hygt in #523 - fix: Fixes compililation error on JDK 23 by @xuwei-k in #530
behind the scene
new contributors
Full Changelog: v2.2.0...v2.3.0
2.2.0
updates
- Update to jarjar-abrams-core 1.14.0 by @eed3si9n in #522
- Reduce memory usage by avoiding to buffer entry contents during
MergeStrategy.deduplicate
by @shuttie in #520
behind the scenes
- Fixes typo in readme by @SethTisue in #518
- Warn about parasitized über JARs in readme by @eed3si9n in #521
new contributors
Full Changelog: v2.1.5...v2.2.0
2.1.5
fixes
- Updates jarjar-abrams to 1.13.1, which fixes processing of classes built with Java 14 (ASM8) and 17 (ASM9) by @cdegroc in #512 / eed3si9n/jarjar-abrams#43
- Reproduces code for issue #479 by @xuwei-k in #514
behind the scene
new contributors
Full Changelog: v2.1.4...v2.1.5
2.1.4
2.1.3
2.1.2
updates
behind the scene
- Updates README: Updates scala versions in test and README by @xuwei-k in #498
- Updates README: log4j2 plugin has been updated and re-released by @mpollmeier in #502
new contributors
- @mpollmeier made their first contribution in #502
Full Changelog: v2.1.1...v2.1.2
2.1.1
2.1.0
updates
- Adds
Tags.limit(Assembly.assemblyTag, 1)
by default to makeassembly
task exclusive @ingarabr in #485 - Fixes file concatenation merge rule by @dragisak in #482
new Contributors
Full Changelog: v2.0.0...v2.1.0
2.0.0
In-memory processing
sbt-assembly 2.0.0 has been refactored to use in-memory processing of library entries, in contrast to its prior versions where library JAR files were unzipped to disk. This has positive performance implications, especially for large projects, machines with slow disks (i.e. spinning hard drives) or systems with slow file systems such as Windows Subsystem for Linux (WSL1) emulated file access.
This overhaul was contributed by Ben Reyes (@fnqista) in #464.
Breaking changes
MergeStrategy.rename
behavior was changed. Directories namedLICENSE
etc will no longer be renamed anymore. If these directories conflict with files namedLICENSE
etc the files will be renamed to include the assembly jar name (minus the.jar
extension) instead.- Fails
*.class
renames viaMergeStrategy.rename
, where it was a silent no-op previously. assemblyCacheUnzip
setting was dropped.excludedFiles
field was dropped fromAssemblyOption
.
Performance improvements
sbt-assembly 2.0.0 generally improves the performance compared to the the previous versions, however the effect of speedup may be dependent on the filesystem and hardware configuration. For example, a Play app that used to take 10s to assemble now assembles in 7s. On Windows, we expect more speedup.
In addition, a new setting called ThisBuild / assemblyRepeatableBuild
is introduced:
ThisBuild / assemblyRepeatableBuild := false
The setting is set to true
(repeatable) by default, but if set to false
, sbt-assembly will parallelize JAR creation for an even faster performance. For instance, a Play app that used to take 10s assembled in 5s on Mac. Your mileage may vary.
CustomMergeStrategy.apply
sbt-assembly 2.0.0 introduces CustomMergeStrategy
builder to construct custom merge strategies.
// same as discard
CustomMergeStrategy("custom-discard") { conflicts =>
Right(Vector.empty)
}
Bug fixes
- Fixes the reported number of affected files
- Files that conflict with directories after the merge will now be printed as a clear error message to the user, instead of failing at runtime
- Fixes the caching directory to reflect the
crossVersion
, where previously, cross-builds (i.e.2.12.8
,2.13.8
) shared the same cache directory. - Fixes Windows problems (#472) by @fnqista in #478
- Runs CI on Windows by @nightscape in #471
- Removes excessive "=" sign in launch script cmd by @DagoDragony in #468
New Contributors
- @fnqista made their first contribution in #464
- @DagoDragony made their first contribution in #468
Full Changelog: v1.2.0...v2.0.0
2.0.0-RC1
What's changed
sbt-assembly 2.0.0 has been refactored to use in-memory processing of library entries, in contrast to its prior versions where library JAR files were unzipped to disk. This has positive performance implications, especially for large projects, machines with slow disks (i.e. spinning hard drives) or systems with slow file systems such as Windows Subsystem for Linux (WSL1) emulated file access.
This overhaul was contributed by Ben Reyes (@fnqista) in #464.
Breaking changes
MergeStrategy.rename
behavior was changed. Directories namedLICENSE
etc will no longer be renamed anymore. If these directories conflict with files namedLICENSE
etc the files will be renamed to include the assembly jar name (minus the.jar
extension) instead.- Fails
*.class
renames viaMergeStrategy.rename
, where it was a silent no-op previously. assemblyCacheUnzip
setting was dropped.excludedFiles
field was dropped fromAssemblyOption
.
Performance improvements
sbt-assembly 2.0.0-RC1 generally improves the performance compared to the the previous versions, however the effect of speedup may be dependent on the filesystem and hardware configuration. For example, a Play app that used to take 10s to assemble now assembles in 7s. On Windows, we expect more speedup.
In addition, a new setting called ThisBuild / assemblyRepeatableBuild
is introduced:
ThisBuild / assemblyRepeatableBuild := false
The setting is set to true
(repeatable) by default, but if set to false
, sbt-assembly will parallelize JAR creation for an even faster performance. For instance, a Play app that used to take 10s assembled in 5s on Mac. Your mileage may vary.
CustomMergeStrategy.apply
sbt-assembly 2.0.0 introduces CustomMergeStrategy
builder to construct custom merge strategies.
// same as discard
CustomMergeStrategy("custom-discard") { conflicts =>
Right(Vector.empty)
}
Bug fixes
- Fixes the reported number of affected files
- Files that conflict with directories after the merge will now be printed as a clear error message to the user, instead of failing at runtime
- Fixes the caching directory to reflect the
crossVersion
, where previously, cross-builds (i.e.2.12.8
,2.13.8
) shared the same cache directory.