Add SpringBootTransformer for merging Spring Boot configuration files#2093
Closed
Goooler wants to merge 1 commit into
Closed
Add SpringBootTransformer for merging Spring Boot configuration files#2093Goooler wants to merge 1 commit into
SpringBootTransformer for merging Spring Boot configuration files#2093Goooler wants to merge 1 commit into
Conversation
Goooler
commented
Jul 8, 2026
Member
- CHANGELOG's "Unreleased" section has been updated, if applicable.
1 task
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dedicated SpringBootTransformer to merge Spring Boot/Spring configuration resources when producing a shadow JAR, including .imports support and relocation behavior, and documents the new transformer for end users.
Changes:
- Introduces
SpringBootTransformerthat merges Spring properties-style files and line-basedMETA-INF/spring/*.importsfiles, applying relocation. - Adds unit + functional test coverage for key merge/relocation behaviors and updates duplicate-strategy checker expectations.
- Updates user documentation and Kotlin ABI dump to reflect the new public transformer API.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/SpringBootTransformer.kt | New transformer implementing Spring Boot/Spring resource merging + relocation. |
| src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/SpringBootTransformerTest.kt | Unit tests for resource matching, merging, and relocation. |
| src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/SpringBootTransformerTest.kt | Functional tests validating behavior in an end-to-end ShadowJar build. |
| src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/DuplicatesStrategyCheckerTest.kt | Updates expected transformer counts due to the new transformer. |
| docs/configuration/merging/README.md | Documents how to enable and what is handled by SpringBootTransformer. |
| api/shadow.api | ABI dump updated to include the new public transformer class. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
70b56a2 to
ed8037b
Compare
4cb9134 to
8b19e63
Compare
8b19e63 to
35d995d
Compare
35d995d to
ac22aa1
Compare
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.