diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2016-01-12 13:52:31 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2016-01-12 13:52:31 +0100 |
commit | da2cf094df5e8bc0470823e7154be84dcd578cd2 (patch) | |
tree | 0ec18b806ce603a2f874b8b7c610221353c259fe /dokka-gradle-plugin/src/main/kotlin/main.kt | |
parent | 628356d63443b11ff2221707c54a397f548d38a4 (diff) | |
download | dokka-da2cf094df5e8bc0470823e7154be84dcd578cd2.tar.gz dokka-da2cf094df5e8bc0470823e7154be84dcd578cd2.tar.bz2 dokka-da2cf094df5e8bc0470823e7154be84dcd578cd2.zip |
allow specifying JDK version to use for JDK links
Diffstat (limited to 'dokka-gradle-plugin/src/main/kotlin/main.kt')
-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() } |