From 24d590574bb19a8063b1afefd0243353c34644fa Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Wed, 22 May 2019 15:13:46 +0200 Subject: Add autoconfiguration, probably needs refactoring --- integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'integration/src/main/kotlin/org/jetbrains') diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt index b41479cf..6eae9701 100644 --- a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt +++ b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt @@ -8,7 +8,6 @@ enum class Platform(val key: String) { native("native"), common("common"); - companion object { val DEFAULT = jvm @@ -22,7 +21,6 @@ enum class Platform(val key: String) { } } } - } interface DokkaConfiguration { @@ -47,7 +45,7 @@ interface DokkaConfiguration { val jdkVersion: Int val sourceLinks: List val perPackageOptions: List - val externalDocumentationLinks: List + val externalDocumentationLinks: List val languageVersion: String? val apiVersion: String? val noStdlibLink: Boolean @@ -86,7 +84,7 @@ interface DokkaConfiguration { constructor(root: String, packageList: String? = null) : this(URL(root), packageList?.let { URL(it) }) - fun build(): DokkaConfiguration.ExternalDocumentationLink = + fun build(): ExternalDocumentationLink = if (packageListUrl != null && url != null) ExternalDocumentationLinkImpl(url!!, packageListUrl!!) else if (url != null) -- cgit