title: android gradle 4.0 compile dependency deprecated- how does new api configuration visibility work?
body: <p>if we take a look at gradle build tools we'll notice that compile configuration dependency is deprecated in favor of <strong>api</strong> and <strong>implementation</strong>.  See <a href="https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_separation" rel="noreferrer">here</a></p>
  
  <p>so i had  question on dependency visiblity using api. Imagine we have the following set in a module called app:</p>
  
  <pre><code>dependencies {
      api 'commons-httpclient:commons-httpclient:3.1'
      implementation 'org.apache.commons:commons-lang3:3.5'
  }
  </code></pre>
  
  <p>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 ?</p>
  
  <p>this is what the android docs have to say about api configuration:</p>
  
  <blockquote>
    <p>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    </p>
  </blockquote>