Update plugin shadow to v9.0.0 #4807
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
9.0.0-rc2
->9.0.0
Release Notes
GradleUp/shadow (com.gradleup.shadow)
v9.0.0
Compare Source
Added
SimpleRelocator
changes from maven-shade-plugin. (#1076)separator
inAppendingTransformer
. (#1169)This is useful for handling files like
resources/application.yml
.module-info.class
in Multi-Release folders by default. (#1177)TargetJvmVersion
attribute for Gradle Module Metadata. (#1199)ShadowApplicationPlugin
withApplicationPlugin
. (#1224)Multi-Release
manifest attribute if any dependency contains it. (#1239)Transformer
as throwingIOException
. (#1248)SimpleRelocator
to improve performance. (#1271)ShadowJar.dependencies
. (#1322)ShadowJar
. (#1365)assemble
depend onshadowJar
. (#1524)PreserveFirstFoundResourceTransformer
. (#1548)This is useful when you set
shadowJar.duplicatesStrategy = DuplicatesStrategy.INCLUDE
(the default behavior) andwant to ensure that only the first found resource is included in the final JAR.
This feature is controlled by the
shadowJar.failOnDuplicateEntries
property, which isfalse
by default.Related to setting
duplicatesStrategy = DuplicatesStrategy.FAIL
but there are some differences:duplicatesStrategy
to any value.Changed
Transformer
s to using lazy properties. (#1036)ShadowJar
to using lazy properties. (#1044)Configuration
directly inDependencyFilter
. (#1045)SimpleRelocator
to using lazy properties. (#1047)SimpleRelocator
. (#1079)ListProperty
usages toSetProperty
. (#1103)Some public
List
parameters are also changed toSet
.RelocatorRemapper
asinternal
. (#1227)ShadowCopyAction
. (#1257)DependencyFilter
intotasks
package. (#1272)duplicatesStrategy
fromEXCLUDE
toINCLUDE
. (#1233)ShadowJar
recognizedEXCLUDE
as the default, but the other strategies didn't work properly.ShadowJar
honorsINCLUDE
as the default, and aligns all the strategy behaviors with the Gradle side.mergeServiceFiles
andServiceFileTransformer
do not work withEXCLUDE
, as it will exclude extra service files to be merged.PreserveFirstFoundResourceTransformer
.filesMatching
to override the default strategy for specific files.failOnDuplicateEntries = true
to fail the build to check for duplicate entries.ShadowTask.from
with Gradle'sAbstractCopyTask.from
. (#1233)In the previous versions,
ShadowTask.from
would always unzip the files before processing them, which caused serialissues that are hard to fix. Now it behaves like Gradle's
AbstractCopyTask.from
, which means it will not unzipthe files, only copy the files as-is. If you still want to shadow the unzipped files, try out something like:
Transformer
toResourceTransformer
. (#1288)Aims to better align with the name
org.apache.maven.plugins.shade.resource.ResourceTransformer.java
and to distinguish itself from
org.gradle.api.Transformer.java
.DefaultInheritManifest
asinternal
. (#1303)ShadowSpec
. (#1307)ShadowSpec
functions are changed toUnit
to avoid confusion.ShadowSpec
no longer extendsCopySpec
.relocate
,transform
and things for better usability in Kotlin.ShadowJar
'sisEnableRelocation
toenableAutoRelocation
. (#1541)ShadowBasePlugin
andShadowJavaPlugin
are moved. (#1589)You can find them in
ShadowJar
,ShadowApplicationPlugin
, andShadowJavaPlugin
.SelfResolvingDependency
withFileCollectionDependency
. (#1114)Transformer
s cacheable. (#1210)ShadowJar.dependencyFilter
as@Input
. (#1206)startShadowScripts
task registering. (#1216)StreamAction
, handle file unzipping viaProject.zipTree
. (#1233)runShadow
no longer depends oninstallShadowDist
. (#1353)ShadowJar
fromshadow
tobuild
. (#1355)AbstractDependencyFilter
frominternal
topublic
. (#1538)You can access it via
com.github.jengelman.gradle.plugins.shadow.tasks.DependencyFilter.AbstractDependencyFilter
.Action
parameters as non-null. (#1555)BufferedOutputStream
when writing the Zip file to improve performance. (#1580)Fixed
Log4j2PluginsCacheFileTransformer
not working for mergingLog4j2Plugins.dat
files. (#1175)mainClass
provided byJavaApplication
. (#1182)ShadowJar
not being successful afterincludes
orexcludes
are changed. (#1200)DuplicatesStrategy
. (#1233)from
. (#1233)kotlin/kotlin.kotlin_builtins
. (#1313)Removed
SimpleRelocator
. (#1079)JavaJarExec
, now useJavaExec
directly forrunShadow
task. (#1197)ServiceFileTransformer.ServiceStream
has been removed. (#1218)KnowsTask
as it's useless. (#1236)BaseStreamAction
. (#1258)ShadowStats
. (#1264)ShadowCopyAction.ArchiveFileTreeElement
andRelativeArchivePath
. (#1233)TransformerContext.getEntryTimestamp
. (#1245)DependencyFilter
. (#1328)ShadowSpec
. (#1560)Relocator.ROLE
. (#1563)ShadowExtension.component
. (#1586)Migration Example
8.x
9.x
If you used Shadow for merging service files, the following steps are recommended:
duplicatesStrategy
as default (INCLUDE
) orWARN
.mergeServiceFiles
orServiceFileTransformer
stuff as you did in your previous setup.INCLUDE
byfilesMatching
orPreserveFirstFoundResourceTransformer
.failOnDuplicateEntries
.New Contributors
Full Changelog: GradleUp/shadow@8.3.9...9.0.0
v9.0.0-rc3
Compare Source
Added
PreserveFirstFoundResourceTransformer
. (#1548)This is useful when you set
shadowJar.duplicatesStrategy = DuplicatesStrategy.INCLUDE
(the default behavior) and want to ensure that only the first found resource is included in the final JAR.This feature is controlled by the
shadowJar.failOnDuplicateEntries
property, which isfalse
by default.Related to setting
duplicatesStrategy = DuplicatesStrategy.FAIL
but there are some differences:duplicatesStrategy
to any value.Changed
ShadowJar
'senableRelocation
toenableAutoRelocation
. (#1541)The Command Line options are also updated:
Action
parameters as non-null. (#1555)Removed
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.