Port more non-API bug fixes and enhancements from main to 8.x - #2189
Conversation
cc6c47a to
4c194c4
Compare
There was a problem hiding this comment.
Pull request overview
Ports a set of non-API fixes from main into the 8.x line, improving NOTICE merging behavior, ShadowJar cache invalidation, and application distribution layout when executableDir is customized.
Changes:
- Adjust
ApacheNoticeResourceTransformerformatting/copyright handling and output writing. - Ensure
ShadowJarreruns whenincludes/excludeschange by wiring them into task inputs. - Respect
javaApplication.executableDirwhen generating/installing start scripts and distributions; update changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/main/groovy/com/github/jengelman/gradle/plugins/shadow/transformers/ApacheNoticeResourceTransformer.groovy | Refines NOTICE parsing/output generation and copyright fallback behavior. |
| src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java | Adds includes/excludes as explicit task inputs to fix up-to-date behavior. |
| src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy | Updates install and distribution script handling to honor executableDir. |
| src/docs/changes/README.md | Documents the backported fixes in the Unreleased changelog. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
4c194c4 to
62dba81
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Merged into #2186. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
src/main/groovy/com/github/jengelman/gradle/plugins/shadow/transformers/ApacheNoticeResourceTransformer.groovy:195
- When a user explicitly configures
copyright,actualCopyrightbecomes the user value, but the derivedfallbackCopyrightentry from the NOTICE contents can still be emitted later in the output because the skip condition only checksactualCopyright. This can reintroduce duplicate copyright blocks. Consider skippingfallbackCopyrightas well (and still skippingactualCopyrightif it happens to appear inentries).
if (line == actualCopyright && count != 2) {
continue
src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy:128
- This PR changes installation/layout behavior to respect
javaApplication.executableDir, but there doesn’t appear to be an integration test asserting non-defaultexecutableDiraffects install/dist outputs (existingApplicationSpeconly exercises the defaultbin). Adding a test that setsapplication { executableDir = 'custom-bin' }and asserts scripts land under that directory (and are chmod’d) would help prevent regressions.
into({ javaApplication.executableDir }) {
from(startScripts)
filePermissions { it.unix(493) }
}
Port additional non-API bug fixes and enhancements from
mainto8.x.Ported PRs / Fixes
ApacheNoticeResourceTransformerpreamble causing malformed NOTICE header #1623, Fix usingApacheNoticeResourceTransformerwithoutprojectName#1627, Fix extra indents ofApacheNoticeResourceTransformeroutput #1628 - Fix formatting and copyright handling in ApacheNoticeResourceTransformerShadowJarnot being successful afterincludesorexcludesare changed #1200 - Fix ShadowJar not being re-executed after includes or excludes are changedShadowApplicationPlugin#1738 - Respect executableDir in application extension when configuring start scripts and distribution