Skip to content

Commit 21f2613

Browse files
GooolerCopilot
andauthored
Document more about deprecated inheritFrom (#1783)
Co-authored-by: Copilot <[email protected]>
1 parent bd7f137 commit 21f2613

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/changes/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,19 @@
4040
and `META-INF/groovy` will be merged into `META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule`.
4141
- Move injecting `Class-Path` manifest attr logic from `doFirst` into `copy`. ([#1720](https://github.com/GradleUp/shadow/pull/1720))
4242
- Move injecting `Main-Class` manifest attr logic from `doFirst` into `copy`. ([#1724](https://github.com/GradleUp/shadow/pull/1724))
43-
- Deprecate `InheritManifest`. ([#1722](https://github.com/GradleUp/shadow/pull/1722))
43+
- Deprecate `InheritManifest` and `inheritFrom`. ([#1722](https://github.com/GradleUp/shadow/pull/1722))
44+
```kotlin
45+
tasks.shadowJar {
46+
// Before (deprecated):
47+
manifest.inheritFrom(tasks.jar.get().manifest)
48+
49+
// After (recommended):
50+
manifest.from(tasks.jar.get().manifest)
51+
52+
// Note: You don't need to inherit the manifest from `jar` task as it's done by default for the `shadowJar` task.
53+
// But if you want to inherit the manifest for your custom `ShadowJar` task, you still need to do it explicitly.
54+
}
55+
```
4456
- Use default `JavaExec` error message when main class is not set. ([#1725](https://github.com/GradleUp/shadow/pull/1725))
4557
- Update `RelocatorRemapper` class pattern to cover more Java method descriptors. ([#1731](https://github.com/GradleUp/shadow/pull/1731))
4658
- Stop using start script templates bundled in Shadow. ([#1738](https://github.com/GradleUp/shadow/pull/1738))

0 commit comments

Comments
 (0)