aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main/kotlin
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-06-21 15:45:48 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-06-21 15:46:59 +0200
commit26b05e709bb025da3d65e739c211aa0fb6350999 (patch)
tree34cc188986a8937a61700954a7915ef8432d34e8 /runners/gradle-plugin/src/main/kotlin
parenta5ba1b51d076fc661f776a18dd51bc8d2182b04a (diff)
downloaddokka-26b05e709bb025da3d65e739c211aa0fb6350999.tar.gz
dokka-26b05e709bb025da3d65e739c211aa0fb6350999.tar.bz2
dokka-26b05e709bb025da3d65e739c211aa0fb6350999.zip
Add configuration of Dokka with closure in Gradle Kotlin DSL
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
index fc447225..f985c70a 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
@@ -2,10 +2,7 @@ package org.jetbrains.dokka.gradle
import com.google.gson.GsonBuilder
import groovy.lang.Closure
-import org.gradle.api.DefaultTask
-import org.gradle.api.NamedDomainObjectContainer
-import org.gradle.api.Project
-import org.gradle.api.Task
+import org.gradle.api.*
import org.gradle.api.artifacts.Configuration
import org.gradle.api.file.FileCollection
import org.gradle.api.internal.plugins.DslObject
@@ -78,6 +75,9 @@ open class DokkaTask : DefaultTask() {
@Nested get() = DslObject(this).extensions.getByType(GradlePassConfigurationImpl::class.java)
internal set(value) = DslObject(this).extensions.add(CONFIGURATION_EXTENSION_NAME, value)
+ // Configure Dokka with closure in Gradle Kotlin DSL
+ fun configuration(action: Action<in GradlePassConfigurationImpl>) = action.execute(configuration)
+
protected var externalDocumentationLinks: MutableList<DokkaConfiguration.ExternalDocumentationLink> = mutableListOf()
private var kotlinTasksConfigurator: () -> List<Any?>? = { defaultKotlinTasks() }