Skip to content

Deprecate enableKotlinModuleRemapping for ShadowJar - #2073

Merged
Goooler merged 4 commits into
mainfrom
g/20260629/deprecate-enable-kotlin-module-remapping
Jul 5, 2026
Merged

Deprecate enableKotlinModuleRemapping for ShadowJar#2073
Goooler merged 4 commits into
mainfrom
g/20260629/deprecate-enable-kotlin-module-remapping

Conversation

@Goooler

@Goooler Goooler commented Jun 29, 2026

Copy link
Copy Markdown
Member

Closes #2066.


  • CHANGELOG's "Unreleased" section has been updated, if applicable.

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread docs/changes/README.md Outdated
@Goooler
Goooler force-pushed the g/20260629/deprecate-enable-kotlin-module-remapping branch 4 times, most recently from bdafc4c to c06dd40 Compare July 2, 2026 01:47
@Goooler
Goooler force-pushed the g/20260629/deprecate-enable-kotlin-module-remapping branch from c06dd40 to b0b5cd7 Compare July 5, 2026 13:23
Goooler and others added 2 commits July 5, 2026 21:43
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Clarify that file paths of Kotlin module metadata files are relocated
unconditionally regardless of enableKotlinModuleRemapping, and that
the option only controls whether contents remapping is applied.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

@Goooler
Goooler enabled auto-merge (squash) July 5, 2026 14:02
@Goooler
Goooler merged commit da18cc0 into main Jul 5, 2026
8 checks passed
@Goooler
Goooler deleted the g/20260629/deprecate-enable-kotlin-module-remapping branch July 5, 2026 14:13
DreierF added a commit to cqse/teamscale-java-profiler that referenced this pull request Aug 17, 2026
Shadow deprecated `enableKotlinModuleRemapping` in 9.5.0 and removes it
in Shadow 10 (GradleUp/shadow#2073). Applying the transformer explicitly
keeps the contents of the `.kotlin_module` files relocated. The shaded
agent jar is byte-identical to before.

Also drop the four explicit relocate(...) calls. They are leftovers from
the kotlin-shadow-relocator plugin removed in 3fd564f, where they took
care of the Kotlin metadata that the transformer now handles. In regular
builds they only duplicated what enableAutoRelocation already does, save
for two unwanted string rewrites: the "retrofitBuilderAction" parameter
name in HttpUtils and a string in retrofit's own @metadata, both caused
by "retrofit" matching beyond package boundaries. In -Pdebug=true builds
they relocated kotlin, okhttp3, okio and retrofit even though that build
exists precisely to keep the package names in the jar matching the ones
IntelliJ knows from the source.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider deprecating enableKotlinModuleRemapping flag

2 participants