New
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 Gradle 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)
Fixed
- Fix excluding dependencies whose versions contain
+. (#1597)