KSLog/dokka.gradle
2022-06-07 23:14:01 +06:00

26 lines
691 B
Groovy

Object callback = {
switch (true) {
case project.hasProperty("DOKKA_PATH"):
outputDirectory = project.property("DOKKA_PATH").toString()
break
case System.getenv("DOKKA_PATH") != null:
outputDirectory = System.getenv("DOKKA_PATH")
break
}
dokkaSourceSets {
configureEach {
skipDeprecated.set(true)
sourceLink {
localDirectory.set(file("./"))
remoteUrl.set(new URL("https://github.com/InsanusMokrassar/KSLog/blob/master/"))
remoteLineSuffix.set("#L")
}
}
}
}
tasks.dokkaGfm(callback)
tasks.dokkaHtml(callback)