diff options
Diffstat (limited to 'dokka-gradle-plugin/src/main')
-rw-r--r-- | dokka-gradle-plugin/src/main/kotlin/main.kt | 10 |
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 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<LinkMapping> = arrayListOf() @Input var samples: ArrayList<String> = arrayListOf() + @Input + var jdkVersion: Int = 6 fun linkMapping(closure: Closure<Any?>) { 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() } |