kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: y
Date Wed, 18 May 2016 23:45:05 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.0 42e96b8b9 -> 67759a333


y

The task is called `aggregatedJavadoc` and the generated html will be under `<project.dir>/build/docs/javadoc/`.

I also disabled javadoc for `tools` and `log4j-appender` as they are not public API.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1398 from ijuma/kafka-3717-aggregate-javadoc

(cherry picked from commit b58bc1f82f80fc566a542259b410b6c293358664)
Signed-off-by: Ismael Juma <ismael@juma.me.uk>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/67759a33
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/67759a33
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/67759a33

Branch: refs/heads/0.10.0
Commit: 67759a333821ebd101abd98c3a1eff21a02b6b88
Parents: 42e96b8
Author: Ismael Juma <ismael@juma.me.uk>
Authored: Thu May 19 00:44:31 2016 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Thu May 19 00:44:44 2016 +0100

----------------------------------------------------------------------
 README.md    | 11 +++++++----
 build.gradle | 36 ++++++++++++++++++++++++++----------
 2 files changed, 33 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/67759a33/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 97c5fef..e9322b4 100644
--- a/README.md
+++ b/README.md
@@ -22,12 +22,15 @@ Follow instructions in http://kafka.apache.org/documentation.html#quickstart
 ### Building source jar ###
     ./gradlew srcJar
 
-### Building javadocs and scaladocs ###
+### Building aggregated javadoc ###
+    ./gradlew aggregatedJavadoc
+
+### Building javadoc and scaladoc ###
     ./gradlew javadoc
-    ./gradlew javadocJar # builds a jar from the javadocs
+    ./gradlew javadocJar # builds a javadoc jar for each module
     ./gradlew scaladoc
-    ./gradlew scaladocJar # builds a jar from the scaladocs
-    ./gradlew docsJar # builds both javadoc and scaladoc jar
+    ./gradlew scaladocJar # builds a scaladoc jar for each module
+    ./gradlew docsJar # builds both (if applicable) javadoc and scaladoc jars for each module
 
 ### Running unit tests ###
     ./gradlew test

http://git-wip-us.apache.org/repos/asf/kafka/blob/67759a33/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 4aa636b..4864d5a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -56,6 +56,15 @@ allprojects {
       }
     }
   }
+
+  if (JavaVersion.current().isJava8Compatible()) {
+    tasks.withType(Javadoc) {
+      // disable the crazy super-strict doclint tool in Java 8
+      // noinspection SpellCheckingInspection
+      options.addStringOption('Xdoclint:none', '-quiet')
+    }
+  }
+
 }
 
 ext {
@@ -112,14 +121,6 @@ subprojects {
     options.compilerArgs << "-Xlint:deprecation"
   }
 
-  if (JavaVersion.current().isJava8Compatible()) {
-    tasks.withType(Javadoc) {
-        // disable the crazy super-strict doclint tool in Java 8
-        //noinspection SpellCheckingInspection
-        options.addStringOption('Xdoclint:none', '-quiet')
-      }
-  }
-
   uploadArchives {
     repositories {
       signing {
@@ -550,6 +551,10 @@ project(':examples') {
     compile project(':core')
   }
 
+  javadoc {
+    enabled = false
+  }
+
   checkstyle {
     configProperties = [importControlFile: "$rootDir/checkstyle/import-control-core.xml"]
   }
@@ -638,7 +643,7 @@ project(':tools') {
   }
 
   javadoc {
-    include "**/org/apache/kafka/tools/*"
+    enabled = false
   }
 
   tasks.create(name: "copyDependantLibs", type: Copy) {
@@ -747,8 +752,9 @@ project(':log4j-appender') {
   }
 
   javadoc {
-    include "**/org/apache/kafka/log4jappender/*"
+    enabled = false
   }
+
 }
 
 project(':connect:api') {
@@ -764,6 +770,7 @@ project(':connect:api') {
   }
 
   javadoc {
+    include "**/org/apache/kafka/connect/**" // needed for the `javadocAll` task
     options.links "http://docs.oracle.com/javase/7/docs/api/"
   }
 
@@ -913,3 +920,12 @@ project(':connect:file') {
     dependsOn copyDependantLibs
   }
 }
+
+task aggregatedJavadoc(type: Javadoc) {
+  def projectsWithJavadoc = subprojects.findAll { it.javadoc.enabled }
+  source = projectsWithJavadoc.collect { it.sourceSets.main.allJava }
+  classpath = files(projectsWithJavadoc.collect { it.sourceSets.main.compileClasspath })
+  includes = projectsWithJavadoc.collectMany { it.javadoc.getIncludes() }
+  excludes = projectsWithJavadoc.collectMany { it.javadoc.getExcludes() }
+  options.links "http://docs.oracle.com/javase/7/docs/api/"
+}


Mime
View raw message