title: Add Lombok to a Gradle project in Intellij
body: <p>New to Gradle. I Apologize if this is a bad question. </p>
  
  <p>I've been trying to start a plain Java8 Gradle project. Everything was great until I tried to add Lombok to my project. </p>
  
  <p>My Intellij IDE has all the settings required for Lombok.</p>
  
  <ol>
  <li>Lombok plugin installed and activated </li>
  <li>Annotation processor is on </li>
  </ol>
  
  <p>The IDE is handling the annotations perfectly. No errors showing, and the boilerplate is shown in the code structure.</p>
  
  <p>However, when I try to build the project or run the main method using Intellij, the compiler complains that the boilerplate Lombok is supposed to generate doesn't exist.</p>
  
  <p>Environment</p>
  
  <pre><code>186590cf4989:JokerJava$ gradlew --version
  
  ------------------------------------------------------------
  Gradle 5.2.1
  ------------------------------------------------------------
  
  Build time:   2019-02-08 19:00:10 UTC
  Revision:     f02764e074c32ee8851a4e1877dd1fea8ffb7183
  
  Kotlin DSL:   1.1.3
  Kotlin:       1.3.20
  Groovy:       2.5.4
  Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
  JVM:          11.0.5 (Oracle Corporation 11.0.5+10-LTS)
  OS:           Mac OS X 10.14.6 x86_64
  
  </code></pre>
  
  <p>Some error message below:</p>
  
  <pre><code>8:23:21 PM: Executing task 'build'...
  
  &gt; Task :generateLombokConfig UP-TO-DATE
  
  &gt; Task :compileJava FAILED
  2 actionable tasks: 1 executed, 1 up-to-date
  warning: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
    Your processor is: org.gradle.api.internal.tasks.compile.processing.IncrementalProcessingEnvironment
    Lombok supports: sun/apple javac 1.6, ECJ
  workspace/tank/JokerJava/src/main/java/tictactoe/game/gui/TicTacToeButton.java:11: error: variable index not initialized in the default constructor
      private final int index;
                        ^
  workspace/tank/JokerJava/src/main/java/tictactoe/game/TicTacToe.java:42: error: constructor TicTacToeButton in class TicTacToeButton cannot be applied to given types;
              buttons[i] = new TicTacToeButton(i);
                           ^
    required: no arguments
    found: int
    reason: actual and formal argument lists differ in length
  /workspace/tank/JokerJava/src/main/java/tictactoe/game/TicTacToe.java:70: error: cannot find symbol
              int index = buttonClicked.getIndex();
                                       ^
    symbol:   method getIndex()
    location: variable buttonClicked of type TicTacToeButton
  /workspace/tank/JokerJava/src/main/java/tictactoe/game/TicTacToe.java:86: error: cannot find symbol
              update(opponentAction.getPlayer(), opponentAction.getIndex());
                                   ^
    symbol:   method getPlayer()
    location: variable opponentAction of type UserAction
  /workspace/tank/JokerJava/src/main/java/tictactoe/game/TicTacToe.java:86: error: cannot find symbol
              update(opponentAction.getPlayer(), opponentAction.getIndex());
                                                               ^
    symbol:   method getIndex()
    location: variable opponentAction of type UserAction
  Note: /workspace/tank/JokerJava/src/main/java/Client.java uses or overrides a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  5 errors
  1 warning
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':compileJava'.
  &gt; Compilation failed; see the compiler error output for details.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 1s
  8:23:22 PM: Task execution finished 'build'.
  </code></pre>
  
  <p>See below for my build.gradle config</p>
  
  <pre><code>plugins {
      id 'java'
      id "io.freefair.lombok" version "5.0.0-rc2"
  }
  
  group 'org.example'
  version '1.0-SNAPSHOT'
  
  sourceCompatibility = 1.8
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      testCompile group: 'junit', name: 'junit', version: '4.12'
  }
  
  </code></pre>