Important
This release is a major update from the 8.3.x series. The plugin has been fully rewritten in Kotlin, bringing significant improvements to maintainability, performance, and future extensibility. It introduces many new features, enhancements, and bug fixes, and includes several breaking changes. Please review the changelog carefully and consult the new doc site before upgrading.
Added
- Add
PreserveFirstFoundResourceTransformer
. (#1548)
This is useful when you setshadowJar.duplicatesStrategy = DuplicatesStrategy.INCLUDE
(the default behavior) and want to ensure that only the first found resource is included in the final JAR. - Fail build if the ZIP entries in the shadowed JAR are duplicate. (#1552)
This feature is controlled by theshadowJar.failOnDuplicateEntries
property, which isfalse
by default.
Related to settingduplicatesStrategy = DuplicatesStrategy.FAIL
but there are some differences:- It only checks the entries in the shadowed jar, not the input files.
- It works with setting
duplicatesStrategy
to any value. - It provides a more strict check before the JAR is created.
Changed
- BREAKING CHANGE: Rename
ShadowJar
'senableRelocation
toenableAutoRelocation
. (#1541)
The Command Line options are also updated:--enable-auto-relocation Enables auto relocation of packages in the dependencies. --no-enable-auto-relocation Disables option --enable-auto-relocation. --fail-on-duplicate-entries Fails build if the ZIP entries in the shadowed JAR are duplicate. --no-fail-on-duplicate-entries Disables option --fail-on-duplicate-entries. --minimize-jar Minimizes the jar by removing unused classes. --no-minimize-jar Disables option --minimize-jar. --relocation-prefix Prefix used for auto relocation of packages in the dependencies. --rerun Causes the task to be re-run even if up-to-date.
- Mark
Action
parameters as non-null. (#1555)
Removed
- Remove JVM default compat stuff. (#1556)