Having read this Gradle documentation I understand the difference between
implementation. However I'd like to know if there's a difference between
implementation and the deprecated
According to this table there is no difference in behavior, but using
runtime in practice seems to "leak" the compile classpath when I was trying it out and so the classes I was trying to hide was actually being exposed to the consuming module.
implementation dependencies are added to the compilation classpath of the project they are declared in. That is not the case for
If you're talking purely about how
runtime dependencies affect consumers of the project, the 4.6 release notes state that
runtime dependencies have always been included on the compilation classpath, which is why you're seeing the leakage.
If you published a library with
implementation dependencies, those dependencies would be marked as
runtime scope in the POM, and I suspect that they would also be included in the compilation classpath of consuming projects. You would need to enable the
IMPROVED_POM_SUPPORT feature to change that.