KAFKA-9381: Fix publishing valid scaladoc for streams-scala (#9486)

Reviewers: Ismael Juma <ismael@confluent.io>, Matthias J. Sax <mjsax@apache.org>
This commit is contained in:
Bill Bejeck 2020-10-26 20:44:25 -04:00 committed by GitHub
parent f1a7097ccd
commit 94d21e3f8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 5 deletions

View File

@ -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')
}