Skip to content
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

Shadowed classes are duplicated #173

Open
TobiX opened this issue Jun 25, 2024 · 1 comment
Open

Shadowed classes are duplicated #173

TobiX opened this issue Jun 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@TobiX
Copy link
Contributor

TobiX commented Jun 25, 2024

Looking at java-snapshot-testing-junit5-4.0.8.jar for example, it seems that all shadowJar classes (https://github.com/origin-energy/java-snapshot-testing/blob/master/build.gradle#L25-L26) are duplicated:

grafik

On the one hand this probably blows up the size of the JAR, on the other hand this confuses some tools (for example https://www.mojohaus.org/extra-enforcer-rules/banDuplicateClasses.html).

What is the reason of shadowing AssertJ and OpenTest4J instead of providing it as a "normal" dependency?

The duplication is probably due to the "duplicate" shadowing in both core and junit5... But I'm not very familiar with Gradle, so I'm only guessing...

@jackmatt2
Copy link
Member

The reason for shadowing was to make the inclusion of this library simpler. It was also used to ensure version clashes don't occur between project and test libraries.

Agree though that there should not be duplicates - happy to accept a Pr fixing it. It's probably just gradle config.

@jackmatt2 jackmatt2 added the enhancement New feature or request label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants