title: Annotation processor in Gradle outputs source files to build/classes making javadoc fail. How to fix it?
body: <p>I have an annotation processor that is automatically picked up by the Java compiler at build time (using SPI). During a gradle build, the generated java sources of this annotation processor are put in build/classes as Gradle tells the annotation processor that this is the place to output generated source files. </p>
  
  <p>When the standard javadoc task is run, it tries to create javadoc for all files in build/classes, including *.java. This failes because javadoc only expects *.class files, making the whole build fail.</p>
  
  <p>So my question is:</p>
  
  <p>Is this a Gradle bug/feature?
  How do I fix it/make it work?</p>