You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add original artifact name to FileTreeElement #913
Transformers should allow access to the Jar file path containing the FileTreeElement.
This is for implementing the method:
boolean canTransformResource(FileTreeElement element)
For example, I would like to be able to do something like
This is useful for allowing us custom mechanisms to override which classes to be used (e.g. when multiple dependencies have the same class files in it...).
Actual Behavior
ShadowCopyAction.ArchiveFileTreeElement is the actual implementation class passed as the element. However, this does not have any information on the containing jar file.
Gradle Build Script(s)
Content of Shadow JAR (jar tf <jar file> - post link to GIST if too long)
In fact, another issue is that ".class" files are not getting transformed... Actually I don't necessarily want it to be transformed, just a way to define the policy for which dependency gets priority when there are class file conflicts.
A similar request for Relocator as well... e.g. RelocatePathContext / RelocateClassContext should hold information about the dependency and/or the jar file it came from.
changed the title [-]Add a getter on ShadowCopyAction.ArchiveFileTreeElement to access the containing jar file name[/-][+]Add original artifact name to `FileTreeElement`[/+]on Mar 13, 2025
Activity
uhyonc commentedon Mar 23, 2024
In fact, another issue is that ".class" files are not getting transformed... Actually I don't necessarily want it to be transformed, just a way to define the policy for which dependency gets priority when there are class file conflicts.
uhyonc commentedon Mar 23, 2024
A similar request for Relocator as well... e.g. RelocatePathContext / RelocateClassContext should hold information about the dependency and/or the jar file it came from.
Goooler commentedon Feb 28, 2025
ArchiveFileTreeElementhas been dropped in #1233, may have to add something toFileTreeElement.TransformerContext#546 as a duplicate of this issueTransformerContext#546 as a duplicate of this issue[-]Add a getter on ShadowCopyAction.ArchiveFileTreeElement to access the containing jar file name[/-][+]Add original artifact name to `FileTreeElement`[/+]Goooler commentedon Jul 31, 2025
Filed a new issue to gradle/gradle#34493.