From da2cf094df5e8bc0470823e7154be84dcd578cd2 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 12 Jan 2016 13:52:31 +0100 Subject: allow specifying JDK version to use for JDK links --- dokka-gradle-plugin/src/main/kotlin/main.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'dokka-gradle-plugin/src/main') diff --git a/dokka-gradle-plugin/src/main/kotlin/main.kt b/dokka-gradle-plugin/src/main/kotlin/main.kt index 3eccafd5..1fe0058f 100644 --- a/dokka-gradle-plugin/src/main/kotlin/main.kt +++ b/dokka-gradle-plugin/src/main/kotlin/main.kt @@ -8,6 +8,7 @@ import org.gradle.api.file.FileCollection import org.gradle.api.plugins.JavaBasePlugin import org.gradle.api.plugins.JavaPluginConvention import org.gradle.api.tasks.* +import org.jetbrains.dokka.DocumentationOptions import org.jetbrains.dokka.DokkaGenerator import org.jetbrains.dokka.SourceLinkDefinition import java.io.File @@ -41,6 +42,8 @@ open class DokkaTask : DefaultTask() { var linkMappings: ArrayList = arrayListOf() @Input var samples: ArrayList = arrayListOf() + @Input + var jdkVersion: Int = 6 fun linkMapping(closure: Closure) { val mapping = LinkMapping() @@ -80,10 +83,9 @@ open class DokkaTask : DefaultTask() { samples, includes, moduleName, - outputDirectory, - outputFormat, - linkMappings.map { SourceLinkDefinition(project.file(it.dir).absolutePath, it.url, it.suffix) }, - false + DocumentationOptions(outputDirectory, outputFormat, + sourceLinks = linkMappings.map { SourceLinkDefinition(project.file(it.dir).absolutePath, it.url, it.suffix) }, + jdkVersion = jdkVersion) ).generate() } -- cgit