Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19888

[Gradle 6.1.1][JAVA] Implementation still loading transitive dependencies in consumer App

$
0
0

No, that is incorrect. The usage of implementation vs. api is related to the classes that are visible on the compile classpath vs. the runtime classpath. If the A library has an implementation dependency on B, this just means that the app can’t compile against classes in B directly, but B still must be loaded in order to not have a ClassNotFoundException when using the parts of A that use B with typical usage.

However, if you have a case where you know that the app will never need to use the specific features in A that have the dependency on B, you can exclude B. This is an independent decision though. It doesn’t have anything to do with using implementation.


Viewing all articles
Browse latest Browse all 19888

Trending Articles