我在build.gradle文件中有以下配置:
buildscript {
ext.dokka_version='0.9.15'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
}
}
apply plugin: 'org.jetbrains.dokka'
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'javadoc'
outputDirectory = "$buildDir/dokkaJavadoc"
}
task packageJavadoc(type: Jar, dependsOn: 'dokkaJavadoc') {
from "$buildDir/dokkaJavadoc"
classifier = 'javadoc'
}
artifacts {
archives packageJavadoc
}
这会生成正确的javadoc jar(“$ {moduleName} -javadoc.jar”)。但是当使用Intellij Idea导入时,虽然它被检测为javdoc jar,但IDE支持不起作用。格式是否与dokka-javadoc或gradle配置错误不兼容?