如果不使用来自文件系统根目录的完整绝对路径,我无法将 Dokka 配置为包含我的包的文档。我的 Gradle 文件中有(该includes
行有问题):
dokka {
outputFormat = 'html'
outputDirectory = "$projectDir/../doc"
configuration {
// Use to include or exclude non public members.
includeNonPublic = false
// Do not output deprecated members. Applies globally, can be overridden by packageOptions
skipDeprecated = false
// Emit warnings about not documented members. Applies globally, also can be overridden by packageOptions
reportUndocumented = true
// Do not create index pages for empty packages
skipEmptyPackages = true
includes = ["${projectDir}/app/src/main/kotlin/com/biexpertise/simplewebview/packages.md"]
}
}
./gradlew dokka
什么时候,如果我有这个错误,我会运行:
> Task :app:dokka FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dokka'.
> org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String
如果我删除$projectDir
并使用绝对路径,则一切正常。可以改用相对路径吗?