diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-06-19 18:51:49 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-06-20 16:15:48 +0300 |
commit | 438fffa8b59c3aca1fd016fbf11689b34eeb0976 (patch) | |
tree | 23f141296509fdbc68359b79bb300caefe0603da /runners/android-gradle-plugin/src/main | |
parent | dff07a0aa73df1a9986d160ca7f97677d049ffeb (diff) | |
download | dokka-438fffa8b59c3aca1fd016fbf11689b34eeb0976.tar.gz dokka-438fffa8b59c3aca1fd016fbf11689b34eeb0976.tar.bz2 dokka-438fffa8b59c3aca1fd016fbf11689b34eeb0976.zip |
Add default documentation link to android reference for dokka-android
Diffstat (limited to 'runners/android-gradle-plugin/src/main')
-rw-r--r-- | runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt | 15 |
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) + } + } +} |