Starting with Gradle 3.0 you are able to limit the scope of dependencies to the module by using ‘implementation’ keyword.
It works fine, but I’ve noticed that if the dependency is a kind of a kotlin extensions (which is a set of kotlin extensions functions), it is leaked to the other modules.
If module A uses module B: implementation project(path: ':B')
and module B uses extension functions library implementation "com.example.some-extensions"
then all of the extension functions are visible in module A.
Is there a way to prevent leaking this kind of dependencies to outer modules?
then you can ‘use’ some-lib’s classes in B as well as in App and IDE won’t complain and add required imports.
The project will eventually fail when you build it and get errors that some dependencies are not resolved.