title: Could not find method annotationProcessor() for arguments
body: <p>Following is my <strong>build.gradle</strong> file. My project compiles locally (IntelliJ-IDEA is my IDE), but when I push it to GitHub, the <strong>travis-ci</strong> build fails. My gradle version is gradle-5.2.</p>
  <pre><code>apply plugin: &quot;java&quot;
  apply plugin: 'jacoco'
  
  sourceCompatibility = 1.8
  version = &quot;1.0&quot;
  
  repositories {
    mavenCentral()
  }
  
  
  dependencies {
    annotationProcessor 'org.projectlombok:lombok:1.18.2'
    compileOnly 'org.projectlombok:lombok:1.18.2'
    testAnnotationProcessor 'org.projectlombok:lombok:1.18.2'
    testCompileOnly 'org.projectlombok:lombok:1.18.2'
  }
  </code></pre>
  <blockquote>
  <p>FAILURE: Build failed with an exception.</p>
  <ul>
  <li>Where: Build file '/home/travis/build/XXX/PROJECT/build.gradle' line: 33</li>
  <li>What went wrong: A problem occurred evaluating root project 'PROJECT'.</li>
  </ul>
  <blockquote>
  <p>Could not find method annotationProcessor() for arguments [org.projectlombok:lombok:1.18.2] on object of type
  org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.</p>
  </blockquote>
  </blockquote>
  <p>The <code>annotationProcessor</code> in <strong>build.gradle</strong> seems not to be parsed, I'm not sure what the underlying issue is. Any help would be appreciated. Thanks.</p>