Skip to content

Modifying string constants as part of relocating packages #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
shalom938 opened this issue Jan 4, 2018 · 1 comment
Open

Modifying string constants as part of relocating packages #357

shalom938 opened this issue Jan 4, 2018 · 1 comment

Comments

@shalom938
Copy link

Shadow Version

2.0.2

Gradle Version

4.3

In a java agent we are developing we are trying to relocate the aspectjrt and aspectjweaver packages but it looks impossible because aspectj weaver uses string constants to test if a class is an aspect. something like that:
public final static UnresolvedType ASPECT_ANNOTATION = UnresolvedType.forSignature("Lorg/aspectj/lang/annotation/Aspect;"

I've tried various suggestions like exclusion of some packages but nothing worked.
The aspectj project lead suggested that "It seems reasonably robust to modify Lorg/aspectj/lang prefixed strings to Lshadow/org/aspectj/lang"

My question is if that seems reasonable to implements something like that as part of shadow plugin?
or what would be the correct way to hook into the plugin and implement that as a gradle task?

Thank you

@Goooler Goooler changed the title relocating aspectj packages - modifying string constants as part of relocating packages Modifying string constants as part of relocating packages Mar 3, 2025
@Goooler
Copy link
Member

Goooler commented Mar 3, 2025

Related to #232.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants