title: Change output directory of generated code in gradle
body: <p>Project contains annotation processor which generates java code during compilation. By default, gradle outputs generated source files into <code>build/classes</code> directory. That causes some problems with discovery of  newly generated source files by IntelliJ.</p>
  
  <p>Is there any straightforward way of configuring gradle to output source files into another directory? For example <code>$buildDir/gen/main/java</code> or <code>$buildDir/build/generated/main/java</code>?</p>