You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ij...@apache.org on 2016/05/18 23:47:27 UTC
kafka git commit: KAFKA-3717;
Support building aggregate javadoc for all project modules [Forced
Update!]
Repository: kafka
Updated Branches:
refs/heads/trunk b58bc1f82 -> 9791401a7 (forced update)
KAFKA-3717; Support building aggregate javadoc for all project modules
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 <is...@juma.me.uk>
Reviewers: Guozhang Wang <wa...@gmail.com>
Closes #1398 from ijuma/kafka-3717-aggregate-javadoc
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/9791401a
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/9791401a
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/9791401a
Branch: refs/heads/trunk
Commit: 9791401a778fee5a165373b923bbe0ece70defbe
Parents: 5b5f3ed
Author: Ismael Juma <is...@juma.me.uk>
Authored: Thu May 19 00:44:31 2016 +0100
Committer: Ismael Juma <is...@juma.me.uk>
Committed: Thu May 19 00:47:14 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/9791401a/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/9791401a/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 91f0637..0f39232 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 {
@@ -548,6 +549,10 @@ project(':examples') {
compile project(':core')
}
+ javadoc {
+ enabled = false
+ }
+
checkstyle {
configProperties = [importControlFile: "$rootDir/checkstyle/import-control-core.xml"]
}
@@ -636,7 +641,7 @@ project(':tools') {
}
javadoc {
- include "**/org/apache/kafka/tools/*"
+ enabled = false
}
tasks.create(name: "copyDependantLibs", type: Copy) {
@@ -745,8 +750,9 @@ project(':log4j-appender') {
}
javadoc {
- include "**/org/apache/kafka/log4jappender/*"
+ enabled = false
}
+
}
project(':connect:api') {
@@ -762,6 +768,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/"
}
@@ -911,3 +918,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/"
+}