GROOVY-12391: grooid jar: java.beans.Transient is rewritten to a clas… - #2913
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2913 +/- ##
==================================================
- Coverage 71.1943% 71.1878% -0.0065%
+ Complexity 37632 37626 -6
==================================================
Files 1581 1581
Lines 136251 136255 +4
Branches 25311 25311
==================================================
- Hits 97003 96997 -6
- Misses 30511 30517 +6
- Partials 8737 8741 +4 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Adds support for excluding specific classes from relocation during grooid jar repackaging to avoid rewriting java.beans.Transient to a non-existent openbeans equivalent (GROOVY-12391), and adds a build-time verification to enforce the constraint.
Changes:
- Introduces a
relocationExcludesinput toRepackageJarTaskand wires it throughGroovyLibraryExtension. - Adds a relocation exclusion for
java.beans.Transientwhen repackaging openbeans. - Adds a
grooidJarpost-build check to assert the produced jar still referencesjava.beans.Transient.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| build.gradle | Adds relocation exclusion for java.beans.Transient and validates the resulting jar contains the expected reference. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/RepackageJarTask.groovy | Adds relocationExcludes and applies per-pattern exclude rules during relocation. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy | Extends the grooid repackaging API to pass relocation exclusions to the underlying task. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| List<String> untouched = relocationExcludes[pattern] ?: [] | ||
| boolean skipStrings = shouldSkipStringConstants(prefix) | ||
| relocate(prefix, destination) { relocator -> | ||
| if (skipStrings) relocator.skipStringConstants = true | ||
| untouched.each { relocator.exclude(it) } | ||
| } |
…s openbeans never had
fcb20d4 to
6ebb625
Compare
✅ All tests passed ✅🏷️ Commit: 6ebb625 Learn more about TestLens at testlens.app/docs. |
…s openbeans never had