You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by bb...@apache.org on 2020/10/27 00:47:04 UTC
[kafka] branch 2.7 updated: KAFKA-9381: Fix publishing valid
scaladoc for streams-scala (#9486)
This is an automated email from the ASF dual-hosted git repository.
bbejeck pushed a commit to branch 2.7
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.7 by this push:
new 2d00425 KAFKA-9381: Fix publishing valid scaladoc for streams-scala (#9486)
2d00425 is described below
commit 2d00425762afab35c8471f32bd513bf2bd4f5ce2
Author: Bill Bejeck <bb...@gmail.com>
AuthorDate: Mon Oct 26 20:44:25 2020 -0400
KAFKA-9381: Fix publishing valid scaladoc for streams-scala (#9486)
Reviewers: Ismael Juma <is...@confluent.io>, Matthias J. Sax <mj...@apache.org>
---
build.gradle | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/build.gradle b/build.gradle
index be59cd2..a369002 100644
--- a/build.gradle
+++ b/build.gradle
@@ -472,7 +472,7 @@ subprojects {
zincVersion = versions.zinc
}
- task scaladocJar(type:Jar) {
+ task scaladocJar(type:Jar, dependsOn: scaladoc) {
classifier = 'scaladoc'
from "$rootDir/LICENSE"
from "$rootDir/NOTICE"
@@ -482,9 +482,6 @@ subprojects {
//documentation task should also trigger building scala doc jar
docsJar.dependsOn scaladocJar
- artifacts {
- archives scaladocJar
- }
}
tasks.withType(ScalaCompile) {
@@ -731,6 +728,14 @@ project(':core') {
println "Building project 'core' with Scala version ${versions.scala}"
apply plugin: 'scala'
+
+ // scaladoc generation is configured at the sub-module level with an artifacts
+ // block (cf. see streams-scala). If scaladoc generation is invoked explicitly
+ // for the `core` module, this ensures the generated jar doesn't include scaladoc
+ // files since the `core` module doesn't include public APIs.
+ scaladoc {
+ enabled = false
+ }
if (userEnableTestCoverage)
apply plugin: "org.scoverage"
archivesBaseName = "kafka_${versions.baseScala}"
@@ -1404,7 +1409,6 @@ project(':streams:streams-scala') {
println "Building project 'streams-scala' with Scala version ${versions.scala}"
apply plugin: 'scala'
archivesBaseName = "kafka-streams-scala_${versions.baseScala}"
-
dependencies {
compile project(':streams')
@@ -1442,6 +1446,10 @@ project(':streams:streams-scala') {
dependsOn 'copyDependantLibs'
}
+ artifacts {
+ archives scaladocJar
+ }
+
test.dependsOn(':spotlessScalaCheck')
}