我正在尝试使用Dokka为 javadoc 和 kotlindoc构建 javadoc
task dokkaDoc(type: org.jetbrains.dokka.gradle.DokkaAndroidTask) {
println("Inside the task dokkaDoc")
moduleName = 'data'
outputFormat = 'javadoc'
outputDirectory = "$buildDir/docs/javadoc"
}
task taskA(type: Zip, dependsOn: dokkaDoc) {
println("Starting task A")
classifier 'dokkaDoc'
extension "zip"
from "$buildDir/docs/kotlindoc"
archiveName 'a.zip'
}
task taskB(type: Zip, dependsOn: dokkaDoc) {
println("Starting task B")
classifier 'dokkaDoc'
extension "zip"
from "$buildDir/docs/kotlindoc"
archiveName 'b.zip'
}
当我尝试执行 taskA 时,taskB 也会被执行。
Output:
>gradlew :Project:a
> Configure project :Project
Inside the task dokkaDoc
Starting task A
Starting task B