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
Given ProjectA and ProjectB ProjectB depends on ProjectA ProjectB has the shadow jar plugin applied
Both projects have com.example.ClassX
duplicatesStrategy is configured for the shadowJar task as shown below.
Shadow Version
5.0.0
Gradle Version
5.3.1
Actual Behavior
running shadowJar task is successful and only the ProjectB's ClassX is in the jar (I think, haven't checked if the zip has multiple entries with same path)
Expected Behavior
Either documentation for duplicatesStrategy behavior, or have same behavior as the specified duplicatesStrategy (Fail in this case)
I think this was some issue on my end, after doing clean and clearing gradle cache this is working again (using the DuplicatesStrategy). I was originally doing the clean because the minimize excludes were also not taking effect. Not sure what put it into bad state.
If it happens again I'll create a different issue with what I was doing and try to reproduce it.
I'm currently facing this issue now, and will try to collect more information while I have it in a bad state. So far, I've tried --rerun-tasks and --no-build-cache each in isolation, and already had shadowJar.inputs.file(buildFile) workaround for another issue in place...
By my read, com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction.StreamAction#visitArchiveFile will de-duplicate regardless of the settings for duplicatesStrategy...
My use case is a little different, I WANT the duplicates included, and it looks like I need to ditch shadow plugin to get it (no time to wait for patches, I just need it yesterday ^-^ ).
Given
ProjectA
andProjectB
ProjectB
depends onProjectA
ProjectB
has the shadow jar plugin appliedBoth projects have
com.example.ClassX
duplicatesStrategy is configured for the
shadowJar
task as shown below.Shadow Version
5.0.0
Gradle Version
5.3.1
Actual Behavior
running
shadowJar
task is successful and only theProjectB
'sClassX
is in the jar (I think, haven't checked if the zip has multiple entries with same path)Expected Behavior
Either documentation for duplicatesStrategy behavior, or have same behavior as the specified duplicatesStrategy (Fail in this case)
Gradle Build Script(s)
The text was updated successfully, but these errors were encountered: