Releases: GradleUp/shadow
Releases · GradleUp/shadow
9.4.0
Added
- Support Isolated Projects. (#1139)
Changed
- Allow opting out of adding
shadowJarintoassemblelifecycle. (#1939)shadow { // Disable making `assemble` task depend on `shadowJar`. This is enabled by default. addShadowJarToAssembleLifecycle = false } - Stop catching
ZipExceptionwhen writing entries. (#1970)
Fixed
9.3.2
8.3.10
Warning
Only Gradle 9 support is being backported to this version. No additional features or crucial bug fixes will be included in the 8.x line. Please migrate to Shadow 9 as soon as possible.
Changed
- Stop using start script templates bundled in Shadow. (#1750)
- Update ASM and jdependency to support Java 26. (#1810)
Fixed
9.3.1
9.3.0
Added
- Add
PatternFilterableResourceTransformerto simplify pattern basedResourceTransformers. (#1849) - Expose
patternSetofServiceFileTransformeraspublic. (#1849) - Expose
patternSetofApacheLicenseResourceTransformeraspublic. (#1850) - Expose
patternSetofApacheNoticeResourceTransformeraspublic. (#1850) - Expose
patternSetofPreserveFirstFoundResourceTransformeraspublic. (#1855) - Support overriding output path of
ApacheNoticeResourceTransformer. (#1851) - Add new merge strategy
FailtoPropertiesFileTransformer. (#1856) - Add
FindResourceInClasspathtask to help with debugging issues with merged duplicate resources. (#1860) - Add
MergeLicenseResourceTransformer. (#1858) - Add
DeduplicatingResourceTransformerto deduplicate on path and content. (#1859) - Support disabling Kotlin module metadata remapping. (#1875)
tasks.shadowJar { // Disable remapping of Kotlin module metadata (`.kotlin_module`) files. This is enabled by default. enableKotlinModuleRemapping = false }
Changed
- Change the group of
startShadowScriptsfromapplicationtoother. (#1797) - Update ASM and jdependency to support Java 26. (#1799)
- Bump min Gradle requirement to 9.0.0. (#1801)
- Deprecate
PreserveFirstFoundResourceTransformer.resources. (#1855) - Make the output of
PropertiesFileTransformerreproducible. (#1861) - Deprecate
ShadowCopyAction. (#1876)
It should not be used as a public API. Will be made internal in a future release.
Fixed
- Fix Develocity integration when Isolated Projects enabled. (#1836)
9.2.2
9.2.1
Added
- Support relocating Groovy extensions in Module descriptors. (#1705)
- Add extensions for
Iterable<Relocator>. (#1710) - Support relocating list of types in
RelocatorRemapper. (#1714) - Add
mainClassproperty intoShadowJar. (#1722)tasks.shadowJar { // This property will be used as a fallback if there is no explicit `Main-Class` attribute set. mainClass = "my.Main" } - Honor
executableDirandapplicationNameinapplicationextension. (#1740)
This is useful when you want to customize the output directory of the start scripts and the application distribution. - Provide more task accessors in
ShadowApplicationPlugin.Companion. (#1771) - Support relocating Kotlin module files. (#1539)
The current implementation relocates all properties inKotlinModuleMetadatabutKmModule.optionalAnnotationClassesdue to very limited usage of it. See more discussion here. - Allow overriding
BUNDLING_ATTRIBUTEin GMM. (#1773)
Theorg.gradle.dependency.bundlingin shadowed JAR's Gradle Module Metadata is set toshadowedby default. You can override it for now by:shadow { bundlingAttribute = Bundling.EMBEDDED }
Changed
- Merge Groovy Module descriptors into the modern
META-INFpath. (#1706)
The Gradle Module descriptors (org.codehaus.groovy.runtime.ExtensionModulefiles) defined underMETA-INF/services/
andMETA-INF/groovywill be merged intoMETA-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule. - Move injecting
Class-Pathmanifest attr logic fromdoFirstintocopy. (#1720) - Move injecting
Main-Classmanifest attr logic fromdoFirstintocopy. (#1724) - Deprecate
InheritManifestandinheritFrom. (#1722)tasks.shadowJar { // Before (deprecated): manifest.inheritFrom(tasks.jar.get().manifest) // After (recommended): manifest.from(tasks.jar.get().manifest) // Note: You don't need to inherit the manifest from `jar` task as it's done by default for the `shadowJar` task. // But if you want to inherit the manifest for your custom `ShadowJar` task, you still need to do it explicitly. } - Use default
JavaExecerror message when main class is not set. (#1725) - Update
RelocatorRemapperclass pattern to cover more Java method descriptors. (#1731) - Stop using start script templates bundled in Shadow. (#1738)
- Bump min Java requirement to 17. (#1744)
- Require most optional properties non-null. (#1745)
- Make assemble depend on shadowJar even if it is added later. (#1766)
Fixed
- Fix excluding dependencies whose versions contain
+. (#1597)
9.1.0
Added
- Allow opting out of
shadowRuntimeElementsvariant. (#1662)shadow { // Disable publishing `shadowRuntimeElements` as an optional variant of the `java` component. addShadowVariantIntoJavaComponent = false } // configuration must be done in the `afterEvaluate` phase, you cannot access `shadowRuntimeElements` before that. val javaComponent = components["java"] as AdhocComponentWithVariants javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { // See more details in https://github.com/GradleUp/shadow/pull/1662. skip() } - Allow opting out of
TARGET_JVM_VERSION_ATTRIBUTE. (#1674)shadow { // Disable adding `TargetJvmVersion` attribute into the Gradle Module Metadata of the shadowed jar. addTargetJvmVersionAttribute = false } - Allow opting out of
Multi-Releaseattribute. (#1675)tasks.shadowJar { // Disable adding `Multi-Release` attribute into the manifest of the shadowed jar. addMultiReleaseAttribute = false }
Changed
9.0.2
Fixed
- Fix missing space in
ApacheNoticeResourceTransformerpreamble causing malformed NOTICE header. (#1623) - Fix using
ApacheNoticeResourceTransformerwithoutprojectName. (#1627) - Fix extra indents of
ApacheNoticeResourceTransformeroutput. (#1628) - Fix resolving BOM dependencies when
minimizeis enabled. (#1637)
9.0.1
Note
If you are upgrading from 8.x versions, please read 9.0.0 release notes first.
Tip
You can diff the shadowed JARs when upgrading from 8.x to 9.x by using Diffuse.
If there are any things missing in the changelog or the doc site, please report them to us.
Changed
- Improve the error message for empty
mainClassName. (#1601) - Default
duplicatesStrategyback toEXCLUDE. (#1617)- This strategy is consistent with 8.x series behavior, which is more compatible for most users upgrading.
- For most
ResourceTransformerusers, you need to override the strategy toINCLUDEto make them work. - Strongly suggest declaring the
duplicatesStrategyexplicitly in yourShadowJarconfiguration to avoid confusion. - See more details about the strategies at Handling Duplicates Strategy.