title: Disable all JavaDoc in Gradle
body: <p><strong>General Update,</strong> after some research<br>
  I want to build my project running <code>gradle 2.0</code> with <code>gradle build</code> in the console I get stuck at the JavaDoc generation.
  I'm using Java 8, precisly <code>jdk1.8.0_66</code> and <code>jre1.8.0_66</code>. Now when I want to build my project typing <code>gradle build</code> in my powershell I get this error:</p>
  
  <pre><code>5 errors
  10 warnings
  :my-subproject1:javadoc FAILED
      FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':my-subproject1:javadoc'.
  &gt; Javadoc generation failed.
  </code></pre>
  
  <p>One sample error and one sample warning:</p>
  
  <pre><code>C:\some\long\path\MyClass.java:37: error: @param name not found
           * @param appCode
                    ^
  C:\some\long\path\MyOtherClass.java:37: warning: no description for @param
           * @param appCode
  </code></pre>
  
  <p>If I disable one of my subprojects using <code>tasks.findByPath(":my-subproject:javadoc").enabled = false</code> in my <code>build.gradle</code> file I get the same error for the next subproject.<br>
  Research has shown that I'm not alone with my problem; Java 8 seems to be really strict with the JavaDoc. This is due to the new <code>doclint for Javadoc</code>. 
  Found on <a href="http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html" rel="noreferrer">this site</a>. It also provides a solution for Maven and Gradle. But for me it doesn't work, another <a href="https://stackoverflow.com/questions/34874175/disable-all-javadoc-in-gradle">answer I got</a> doesn't work either. My attempts to solve it look like this right now in my <code>build.gradle</code> for this subproject:</p>
  
  <pre><code>//Solution by the second link
  allprojects {
      tasks.withType(Javadoc).all { enabled = false }
  }
  //Solution by the first link
  if (JavaVersion.current().isJava8Compatible()) {
      allprojects {
          tasks.withType(Javadoc) {
              options.addStringOption('Xdoclint:none', '-quiet')
          }
      }
  }
  
  
  dependencies{
      compile project(':my-subproject1')
      compile project(':my-subproject2')
      compile project(':my-subproject3')
  }
  </code></pre>
  
  <p>Does anybody know how to solve this issue or is there another workaround?</p>
  
  <p><strong>Edit:</strong></p>
  
  <pre><code>C:. | Root
  ├───build.gradle
  │   └───2.0
  │       └───taskArtifacts
  ├───buildSrc
  │   ├───.gradle
  │   │   ├───2.0
  │   │   │   └───taskArtifacts
  │   │   └───noVersion
  │   │       └───buildSrc
  │   ├───build
  │   │   ├───classes
  │   │   │   └───main
  │   │   ├───dependency-cache
  │   │   ├───libs
  │   │   └───tmp
  │   └───src
  │       └───main
  │           └───java
  │               └───com
  │                   └───custom
  │                       └───gradle
  │                           └───util
  ├───my-subproject1
  ├───my-subproject2
  ├───my-subproject3
  │   ├───my-sub-subproject
  │   ├───my-current-directory | Magic happens here
  │   │   ├───some.package.identifier
  │   │   │   ├───.clover
  │   │   │   ├───.settings
  │   │   │   ├───bin
  │   │   │   │   └───package
  │   │   │   │       └───subpackage
  │   │   │   └───buil.gradle | This should build my subproject
  </code></pre>
  
  <p><strong>Solution:</strong> Put it in the root <code>build.gradle</code> file.</p>