title: Why isn't “api” method available in Gradle 4.4/Java plugin, when “implementation” is?
body: <p>I'm using AS 3.1, trying to be a good programmer and clear the "compile is obsolete" warnings. But I desire this particular .jar to expose Guava as an API. Other projects (e.g. CloudServerApplication) need Guava, too. But when I use the <code>api</code> keyword, instead of <code>compile</code> or <code>implementation</code>, I get this:</p>
  
  <pre><code>&gt;gradlew FrameManager:build
  
  &gt; Configure project :CloudServerApplication
  4.4
  
  &gt; Configure project :FrameManager
  4.4
  
  
  FAILURE: Build failed with an exception.
  
  * Where:
  Build file 'C:\FrameManager\app\build.gradle' line: 16
  
  * What went wrong:
  A problem occurred evaluating project ':FrameManager'.
  &gt; Could not find method api() for arguments [com.google.guava:guava:14+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
  </code></pre>
  
  <p>I tried Googling the error, but did not find anything useful. Not really sure where to look next.</p>
  
  <p>My build.gradle:</p>
  
  <pre><code>apply plugin: 'java'
  
  println GradleVersion.current().getVersion()
  
  repositories {
      jcenter()
  }
  
  dependencies {
      implementation 'org.json:json:20160212'
      api 'com.google.guava:guava:14+'   //&lt;-- This used to be "compile"
  }
  </code></pre>