aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src
diff options
context:
space:
mode:
Diffstat (limited to 'runners/gradle-plugin/src')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/main.kt27
1 files changed, 19 insertions, 8 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt
index bdecc3f6..8c7f608e 100644
--- a/runners/gradle-plugin/src/main/kotlin/main.kt
+++ b/runners/gradle-plugin/src/main/kotlin/main.kt
@@ -51,6 +51,8 @@ object ClassloaderContainer {
var fatJarClassLoader: ClassLoader? = null
}
+const val `deprecationMessage reportNotDocumented` = "Will be removed in 0.9.17, see dokka#243"
+
open class DokkaTask : DefaultTask() {
fun defaultKotlinTasks() = with(ReflectDsl) {
@@ -69,7 +71,7 @@ open class DokkaTask : DefaultTask() {
description = "Generates dokka documentation for Kotlin"
@Suppress("LeakingThis")
- dependsOn(Callable { kotlinTasks.flatMap { it.dependsOn } })
+ dependsOn(Callable { kotlinTasks.map { it.taskDependencies } })
}
@Input
@@ -104,7 +106,16 @@ open class DokkaTask : DefaultTask() {
@Input var includeNonPublic = false
@Input var skipDeprecated = false
@Input var skipEmptyPackages = true
- @Input var reportNotDocumented = true
+
+ @Deprecated(`deprecationMessage reportNotDocumented`, replaceWith = ReplaceWith("reportUndocumented"))
+ var reportNotDocumented
+ get() = reportUndocumented
+ set(value) {
+ logger.warn("Dokka: reportNotDocumented is deprecated and " + `deprecationMessage reportNotDocumented`.decapitalize())
+ reportUndocumented = value
+ }
+
+ @Input var reportUndocumented = true
@Input var perPackageOptions: MutableList<PackageOptions> = arrayListOf()
@Input var impliedPlatforms: MutableList<String> = arrayListOf()
@@ -133,7 +144,7 @@ open class DokkaTask : DefaultTask() {
kotlinTasksConfigurator = { closure.call() as? List<Any?> }
}
- fun linkMapping(closure: Closure<Any?>) {
+ fun linkMapping(closure: Closure<Unit>) {
val mapping = LinkMapping()
closure.delegate = mapping
closure.call()
@@ -148,21 +159,21 @@ open class DokkaTask : DefaultTask() {
linkMappings.add(mapping)
}
- fun sourceRoot(closure: Closure<Any?>) {
+ fun sourceRoot(closure: Closure<Unit>) {
val sourceRoot = SourceRoot()
closure.delegate = sourceRoot
closure.call()
sourceRoots.add(sourceRoot)
}
- fun packageOptions(closure: Closure<Any?>) {
+ fun packageOptions(closure: Closure<Unit>) {
val packageOptions = PackageOptions()
closure.delegate = packageOptions
closure.call()
perPackageOptions.add(packageOptions)
}
- fun externalDocumentationLink(closure: Closure<Any?>) {
+ fun externalDocumentationLink(closure: Closure<Unit>) {
val builder = DokkaConfiguration.ExternalDocumentationLink.Builder()
closure.delegate = builder
closure.call()
@@ -278,7 +289,7 @@ open class DokkaTask : DefaultTask() {
outputFormat,
includeNonPublic,
false,
- reportNotDocumented,
+ reportUndocumented,
skipEmptyPackages,
skipDeprecated,
jdkVersion,
@@ -368,7 +379,7 @@ open class DokkaTask : DefaultTask() {
}
}
-class SourceRoot : DokkaConfiguration.SourceRoot {
+class SourceRoot : DokkaConfiguration.SourceRoot, Serializable {
override var path: String = ""
set(value) {
field = File(value).absolutePath