if we take a look at gradle build tools we'll notice that compile configuration dependency is deprecated in favor of api and implementation. See here
so i had question on dependency visiblity using api. Imagine we have the following set in a module called app:
dependencies {
api 'commons-httpclient:commons-httpclient:3.1'
implementation 'org.apache.commons:commons-lang3:3.5'
}
So from what i gather the org.apache.commons:commons-lang3:3.5 will only be available in the module itself. but the commons-httpclient:commons-httpclient:3.1 dependency will abe available outside of the module, what does that actually mean ?does that mean if i made my app module into a library that the dependency will be available to whoever uses the library, (wasn't it always like that anyway ?
this is what the android docs have to say about api configuration:
api compile The dependency is available to the module at compile time, and it's also available to the consumer of the module at compile time and runtime. This configuration behaves just like compile (which is now deprecated), and you should typically use this only in library modules. App modules should use implementation, unless you want to expose its API to a separate test module. compileOnly provided