Typically, a gradle will only include 1 drum per addiction. If another version is found for the same dependencies, a newer version will be used.
However, in your case, these 2 jars are dependencies with different group names:
'javax.inject:javax.inject:1' 'org.glassfish.hk2.external:javax.inject:2.3.0-b05'
This is why gradle included both, as they are treated as different dependencies.
'javax.inject: javax.inject: 1' is very old, I think you should exclude it, as Niels Beh Nielsen said.
To find out where this dependency came from, you can use the command:
gradle -q dependencyInsight --dependency inject
source share