Allow opting out of Multi-Release attribute#1675
Merged
Conversation
a56efa2 to
e7f1b6f
Compare
e7f1b6f to
e71c8ee
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to opt out of automatically adding the Multi-Release manifest attribute to shadow JARs. By default, Shadow currently scans dependencies and adds Multi-Release: true to the manifest if any dependency contains this attribute.
- Introduces a new
addMultiReleaseAttributeproperty that defaults totruefor backward compatibility - Adds command-line option support for controlling this behavior via
--add-multi-release-attributeand--no-add-multi-release-attribute - Updates documentation to explain the new configuration option
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ShadowJar.kt | Adds the new addMultiReleaseAttribute property and implements the opt-out logic in the manifest injection method |
| JavaPluginsTest.kt | Adds comprehensive tests for both programmatic and CLI configuration of the new feature |
| getting-started/README.md | Documents the new command-line options |
| configuration/README.md | Adds detailed documentation explaining the new configuration property |
| changes/README.md | Updates the changelog with the new feature |
| shadow.api | Updates the public API file to include the new property |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.kt
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1661.