Mark ObjectFactory-injected ResourceTransformers as abstract - #2205
Closed
Goooler wants to merge 2 commits into
Closed
Mark ObjectFactory-injected ResourceTransformers as abstract#2205Goooler wants to merge 2 commits into
ObjectFactory-injected ResourceTransformers as abstract#2205Goooler wants to merge 2 commits into
Conversation
Goooler
commented
Aug 19, 2026
Member
- CHANGELOG's "Unreleased" section has been updated, if applicable.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Shadow’s built-in ResourceTransformer implementations that rely on ObjectFactory injection to be abstract, aligning their instantiation model with ObjectFactory.newInstance and reflecting the (potentially breaking) API change in the public surface and changelog.
Changes:
- Mark multiple
ObjectFactory-injected built-inResourceTransformers asabstract(API-affecting change). - Adjust
ResourceTransformer.create(...)to detectObjectFactoryconstructors viadeclaredConstructors. - Update internal test discovery logic, changelog, and the published API dump to match the new abstract types.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/DuplicatesStrategyCheckerTest.kt | Updates transformer class discovery to avoid picking up the abstract base PatternFilterableResourceTransformer while allowing abstract injected transformers. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/ResourceTransformer.kt | Changes instantiation helper to scan declaredConstructors for ObjectFactory injection support. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/PropertiesFileTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/PreserveFirstFoundResourceTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/MergeLicenseResourceTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/ManifestResourceTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/ManifestAppenderTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/KotlinModuleMetadataTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/IncludeResourceTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/DontIncludeResourceTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/AppendingTransformer.kt | Makes the injected transformer type abstract. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/ApacheNoticeResourceTransformer.kt | Makes the injected transformer type abstract. |
| docs/changes/README.md | Documents the potentially breaking change in the unreleased changelog. |
| api/shadow.api | Updates the public API dump to reflect the new abstract class modifiers. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
abstract for ObjectFactory-injected ResourceTransformersObjectFactory-injected ResourceTransformers as abstract
Member
Author
|
Not for now. |
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.