aboutsummaryrefslogtreecommitdiff
path: root/runners/android-gradle-plugin/src
diff options
context:
space:
mode:
authorKrystianUjma <kujma@virtuslab.com>2019-05-07 12:36:26 +0200
committerKrystianUjma <kujma@virtuslab.com>2019-05-07 12:38:56 +0200
commitd2777df57ac81a69ab78e982adda2cedcb2d5e8d (patch)
treefae74dba95cbb016a724b1c33495a286cb97cc66 /runners/android-gradle-plugin/src
parent34b6959e68d356a66330441398febaebc5e6c7bc (diff)
parentfef60431fdbc9a59a537bdb83f180383b8fd9678 (diff)
downloaddokka-d2777df57ac81a69ab78e982adda2cedcb2d5e8d.tar.gz
dokka-d2777df57ac81a69ab78e982adda2cedcb2d5e8d.tar.bz2
dokka-d2777df57ac81a69ab78e982adda2cedcb2d5e8d.zip
Merge branch 'multiplatform-support' of github.com:KrystianUjma/dokka into multiplatform-support
Diffstat (limited to 'runners/android-gradle-plugin/src')
-rw-r--r--runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt b/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt
index 367b9257..2d79013e 100644
--- a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt
+++ b/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt
@@ -7,6 +7,9 @@ import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink.Builder
import org.jetbrains.dokka.DokkaConfiguration.SourceRoot
import java.io.File
+internal const val CONFIGURATION_EXTENSION_NAME = "configuration"
+internal const val MULTIPLATFORM_EXTENSION_NAME = "multiplatform"
+
open class DokkaAndroidPlugin : Plugin<Project> {
override fun apply(project: Project) {
DokkaVersion.loadFrom(javaClass.getResourceAsStream("/META-INF/gradle-plugins/org.jetbrains.dokka-android.properties"))
@@ -15,6 +18,11 @@ open class DokkaAndroidPlugin : Plugin<Project> {
moduleName = project.name
outputDirectory = File(project.buildDir, "dokka").absolutePath
}
+ project.tasks.withType(DokkaTask::class.java) { task ->
+ val passConfiguration = project.container(GradlePassConfigurationImpl::class.java)
+ task.extensions.add(MULTIPLATFORM_EXTENSION_NAME, passConfiguration)
+ task.extensions.create(CONFIGURATION_EXTENSION_NAME, GradlePassConfigurationImpl::class.java, "")
+ }
}
}