Skip to content

Commit f7d8d1b

Browse files
authored
Deprecate InheritManifest (#1722)
* Try to remove `InheritManifest` * Revert "Try to remove `InheritManifest`" This reverts commit 1a0745d. * Mark `Deprecated` * Update changelog
1 parent 2afeece commit f7d8d1b

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

docs/changes/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
The Gradle Module descriptors (`org.codehaus.groovy.runtime.ExtensionModule` files) defined under `META-INF/services/`
1616
and `META-INF/groovy` will be merged into `META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule`.
1717
- Move injecting `Class-Path` manifest attr logic from `doFirst` into `copy`. ([#1720](https://github.com/GradleUp/shadow/pull/1720))
18+
- Deprecate `InheritManifest`. ([#1722](https://github.com/GradleUp/shadow/pull/1722))
1819

1920
### Fixed
2021

src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/DefaultInheritManifest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION")
2+
13
package com.github.jengelman.gradle.plugins.shadow.internal
24

35
import com.github.jengelman.gradle.plugins.shadow.tasks.InheritManifest

src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/InheritManifest.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import org.gradle.api.Action
44
import org.gradle.api.java.archives.Manifest
55
import org.gradle.api.java.archives.ManifestMergeSpec
66

7+
@Deprecated(
8+
message = "This is deprecated and will be removed in a future release. `inheritFrom` should be replaced by `from`.",
9+
replaceWith = ReplaceWith("Manifest", "org.gradle.api.java.archives.Manifest"),
10+
)
711
public interface InheritManifest : Manifest {
812
public fun inheritFrom(vararg inheritPaths: Any) {
913
inheritFrom(inheritPaths = inheritPaths, action = {})

src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ public abstract class ShadowJar : Jar() {
195195
@get:Option(option = "add-multi-release-attribute", description = "Adds the multi-release attribute to the manifest if any dependencies contain it.")
196196
public open val addMultiReleaseAttribute: Property<Boolean> = objectFactory.property(true)
197197

198+
@Suppress("DEPRECATION") // TODO: replace the usage of deprecated InheritManifest.
198199
@Internal
199200
override fun getManifest(): InheritManifest = super.getManifest() as InheritManifest
200201

0 commit comments

Comments
 (0)