You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2020/01/06 08:12:00 UTC
[calcite] 02/07: Add gradle task 'aggregateJavadocIncludingTests'
that builds javadoc for both main and test
This is an automated email from the ASF dual-hosted git repository.
jhyde pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
commit 4e7f92557a240de58cd950dce6ab478c1bc11604
Author: Julian Hyde <jh...@apache.org>
AuthorDate: Wed Nov 20 14:10:48 2019 -0800
Add gradle task 'aggregateJavadocIncludingTests' that builds javadoc for both main and test
It will allow CI to spot javadoc errors, for example broken links, in test code.
---
build.gradle.kts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/build.gradle.kts b/build.gradle.kts
index c67f112..a3dc229 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -143,6 +143,20 @@ val javadocAggregate by tasks.registering(Javadoc::class) {
setDestinationDir(file("$buildDir/docs/javadocAggregate"))
}
+/** Similar to {@link #javadocAggregate} but includes tests.
+ * CI uses this target to validate javadoc (e.g. checking for broken links). */
+val javadocAggregateIncludingTests by tasks.registering(Javadoc::class) {
+ description = "Generates aggregate javadoc for all the artifacts"
+
+ val sourceSets = allprojects
+ .mapNotNull { it.extensions.findByType<SourceSetContainer>() }
+ .flatMap { listOf(it.named("main"), it.named("test")) }
+
+ classpath = files(sourceSets.map { set -> set.map { it.output + it.compileClasspath } })
+ setSource(sourceSets.map { set -> set.map { it.allJava } })
+ setDestinationDir(file("$buildDir/docs/javadocAggregateIncludingTests"))
+}
+
val adaptersForSqlline = listOf(
":babel", ":cassandra", ":druid", ":elasticsearch", ":file", ":geode", ":kafka", ":mongodb",
":pig", ":piglet", ":plus", ":spark", ":splunk"