Require most optional properties non-null#1745
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the @Optional annotation from several property fields and makes them require non-null values by providing default empty string values instead of allowing null.
- Removes
@Optionalannotations from property fields across multiple transformer classes - Changes properties to use default empty string values instead of allowing null
- Updates logic to handle empty strings instead of null values
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| XmlAppendingTransformer.kt | Removes @optional from resource property, defaults to empty string, updates null check to empty check |
| ManifestResourceTransformer.kt | Removes @optional from mainClass property, defaults to empty string, updates null handling logic |
| DontIncludeResourceTransformer.kt | Removes @optional from resource property, defaults to empty string, simplifies null/empty check |
| AppendingTransformer.kt | Removes @optional from resource property, defaults to empty string, updates null check to empty check |
| ApacheNoticeResourceTransformer.kt | Removes @optional from copyright property, defaults to empty string, updates null handling |
| ShadowJar.kt | Removes @optional from configurations and mainClass properties, updates null checks to empty checks |
| README.md | Adds changelog entry for this change |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...otlin/com/github/jengelman/gradle/plugins/shadow/transformers/ManifestResourceTransformer.kt
Outdated
Show resolved
Hide resolved
...in/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.kt
Show resolved
Hide resolved
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/AppendingTransformer.kt
Show resolved
Hide resolved
87a1578 to
d93c20a
Compare
…nsformers/ManifestResourceTransformer.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...in/com/github/jengelman/gradle/plugins/shadow/transformers/DontIncludeResourceTransformer.kt
Show resolved
Hide resolved
Goooler
commented
Sep 15, 2025
59a96a9 to
8ca3a32
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.
Uh oh!
There was an error while loading. Please reload this page.