aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runners/android-gradle-plugin/build.gradle1
-rw-r--r--runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt15
2 files changed, 15 insertions, 1 deletions
diff --git a/runners/android-gradle-plugin/build.gradle b/runners/android-gradle-plugin/build.gradle
index dc3d2ce3..a1747619 100644
--- a/runners/android-gradle-plugin/build.gradle
+++ b/runners/android-gradle-plugin/build.gradle
@@ -23,6 +23,7 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
shadow project(path: ':runners:gradle-plugin', configuration: 'shadow')
+ compileOnly project(':integration')
provided gradleApi()
provided localGroovy()
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)
+ }
+ }
+}