Could org.mapstruct.examples.kotlin:mapstruct-examples-kotlin:1.0.0-SNAPSHOT drop off redundant dependencies? #134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! I found the pom file of project org.mapstruct.examples.kotlin:mapstruct-examples-kotlin:1.0.0-SNAPSHOT introduced 10 dependencies. However, among them, 3 libraries (30%) are not used by your project. I list the redundant dependencies below (labelled as red ones in the figure):
Redundant dependencies
org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.5.10:compile
org.jetbrains.kotlin:kotlin-test-junit:jar:1.5.10:test
org.jetbrains:annotations:jar:13.0:compile
Removing the redundant dependencies can reduce the size of project and prevent potential dependency conflict issues (i.e., multiple versions of the same library). More importantly, As such, I suggest a refactoring operation for org.mapstruct.examples.kotlin:mapstruct-examples-kotlin:1.0.0-SNAPSHOT’s pom file.
As shown in the figure, it is noteworthy that, libraries org.jetbrains.kotlin:kotlin-test::1.5.10:test(130KB) are invoked by the projects. When we remove the redundant dependency org.jetbrains.kotlin:kotlin-test-junit::1.5.10:test, the above org.jetbrains.kotlin:kotlin-test::1.5.10:test(130KB) should be declared as direct dependencies. The attached PR helps resolve the reported problem. It is safe to remove the unused libraries (we considered Java reflection relations when analyzing the dependencies). These changes have passed org.mapstruct.examples.kotlin:mapstruct-examples-kotlin:1.0.0-SNAPSHOT’s maven tests.
Best regards