aboutsummaryrefslogtreecommitdiff
path: root/dokka-gradle-plugin/src
diff options
context:
space:
mode:
Diffstat (limited to 'dokka-gradle-plugin/src')
-rw-r--r--dokka-gradle-plugin/src/main/kotlin/main.kt10
1 files changed, 6 insertions, 4 deletions
diff --git a/dokka-gradle-plugin/src/main/kotlin/main.kt b/dokka-gradle-plugin/src/main/kotlin/main.kt
index 53045326..476f7656 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<LinkMapping> = arrayListOf()
@Input
var samples: List<Any?> = arrayListOf()
+ @Input
+ var jdkVersion: Int = 6
fun linkMapping(closure: Closure<Any?>) {
val mapping = LinkMapping()
@@ -80,10 +83,9 @@ open class DokkaTask : DefaultTask() {
samples.filterNotNull().map { project.file(it).absolutePath },
includes.filterNotNull().map { project.file(it).absolutePath },
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()
}