aboutsummaryrefslogtreecommitdiff
path: root/runners/android-gradle-plugin/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'runners/android-gradle-plugin/src/main/kotlin')
-rw-r--r--runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt15
1 files changed, 14 insertions, 1 deletions
diff --git a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt b/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt
index 8dd0a4c6..f392f1ab 100644
--- a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt
+++ b/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt
@@ -2,6 +2,8 @@ package org.jetbrains.dokka.gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
+import org.gradle.api.tasks.Input
+import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink.Builder
import java.io.File
open class DokkaAndroidPlugin : Plugin<Project> {
@@ -14,4 +16,15 @@ open class DokkaAndroidPlugin : Plugin<Project> {
}
}
-open class DokkaAndroidTask : DokkaTask()
+private val ANDROID_REFERENCE_URL = Builder("https://developer.android.com/reference/").build()
+
+open class DokkaAndroidTask : DokkaTask() {
+
+ @Input var noAndroidSdkLink: Boolean = false
+
+ init {
+ project.afterEvaluate {
+ if (!noAndroidSdkLink) externalDocumentationLinks.add(ANDROID_REFERENCE_URL)
+ }
+ }
+}