aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Kotlin
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-01-12 13:52:31 +0100
committerDmitry Jemerov <yole@jetbrains.com>2016-01-12 13:52:31 +0100
commitda2cf094df5e8bc0470823e7154be84dcd578cd2 (patch)
tree0ec18b806ce603a2f874b8b7c610221353c259fe /core/src/main/kotlin/Kotlin
parent628356d63443b11ff2221707c54a397f548d38a4 (diff)
downloaddokka-da2cf094df5e8bc0470823e7154be84dcd578cd2.tar.gz
dokka-da2cf094df5e8bc0470823e7154be84dcd578cd2.tar.bz2
dokka-da2cf094df5e8bc0470823e7154be84dcd578cd2.zip
allow specifying JDK version to use for JDK links
Diffstat (limited to 'core/src/main/kotlin/Kotlin')
-rw-r--r--core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt7
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt1
2 files changed, 5 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt
index c1c301f2..c62f9cbf 100644
--- a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt
+++ b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt
@@ -14,7 +14,8 @@ import org.jetbrains.kotlin.resolve.source.PsiSourceElement
class DeclarationLinkResolver
@Inject constructor(val resolutionFacade: DokkaResolutionFacade,
val refGraph: NodeReferenceGraph,
- val logger: DokkaLogger) {
+ val logger: DokkaLogger,
+ val options: DocumentationOptions) {
fun resolveContentLink(fromDescriptor: DeclarationDescriptor, href: String): ContentBlock {
val symbol = try {
val symbols = resolveKDocLink(resolutionFacade, fromDescriptor, null, href.split('.').toList())
@@ -71,5 +72,5 @@ class DeclarationLinkResolver
return null
}
- private val javadocRoot = "http://docs.oracle.com/javase/6/docs/api/"
-} \ No newline at end of file
+ private val javadocRoot = "http://docs.oracle.com/javase/${options.jdkVersion}/docs/api/"
+}
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
index 4694bcdf..f91f160b 100644
--- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
@@ -41,6 +41,7 @@ data class DocumentationOptions(val outputDir: String,
val reportUndocumented: Boolean = true,
val skipEmptyPackages: Boolean = true,
val skipDeprecated: Boolean = false,
+ val jdkVersion: Int = 6,
val sourceLinks: List<SourceLinkDefinition>)
private fun isExtensionForExternalClass(extensionFunctionDescriptor: DeclarationDescriptor,