aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/configuration.kt4
-rw-r--r--core/src/main/kotlin/defaultExternalLinks.kt29
2 files changed, 15 insertions, 18 deletions
diff --git a/core/src/main/kotlin/configuration.kt b/core/src/main/kotlin/configuration.kt
index e0f973d7..4c722a37 100644
--- a/core/src/main/kotlin/configuration.kt
+++ b/core/src/main/kotlin/configuration.kt
@@ -56,9 +56,7 @@ interface DokkaConfigurationBuilder<T : Any> {
fun build(): T
}
-fun <T : Any> Iterable<DokkaConfigurationBuilder<T>>.build(): List<T> {
- return this.map { it.build() }
-}
+fun <T : Any> Iterable<DokkaConfigurationBuilder<T>>.build(): List<T> = this.map { it.build() }
data class DokkaSourceSetID(
val moduleName: String,
diff --git a/core/src/main/kotlin/defaultExternalLinks.kt b/core/src/main/kotlin/defaultExternalLinks.kt
index d8c95076..01eefb39 100644
--- a/core/src/main/kotlin/defaultExternalLinks.kt
+++ b/core/src/main/kotlin/defaultExternalLinks.kt
@@ -4,8 +4,8 @@ import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink
import java.net.URL
-fun ExternalDocumentationLink.Companion.jdk(jdkVersion: Int): ExternalDocumentationLinkImpl {
- return ExternalDocumentationLink(
+fun ExternalDocumentationLink.Companion.jdk(jdkVersion: Int): ExternalDocumentationLinkImpl =
+ ExternalDocumentationLink(
url =
if (jdkVersion < 11) "https://docs.oracle.com/javase/${jdkVersion}/docs/api/"
else "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/java.base/",
@@ -13,19 +13,18 @@ fun ExternalDocumentationLink.Companion.jdk(jdkVersion: Int): ExternalDocumentat
if (jdkVersion < 11) "https://docs.oracle.com/javase/${jdkVersion}/docs/api/package-list"
else "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/element-list"
)
-}
-fun ExternalDocumentationLink.Companion.kotlinStdlib(): ExternalDocumentationLinkImpl {
- return ExternalDocumentationLink("https://kotlinlang.org/api/latest/jvm/stdlib/")
-}
-fun ExternalDocumentationLink.Companion.androidSdk(): ExternalDocumentationLinkImpl {
- return ExternalDocumentationLink("https://developer.android.com/reference/")
-}
+fun ExternalDocumentationLink.Companion.kotlinStdlib(): ExternalDocumentationLinkImpl =
+ ExternalDocumentationLink("https://kotlinlang.org/api/latest/jvm/stdlib/")
+
+
+fun ExternalDocumentationLink.Companion.androidSdk(): ExternalDocumentationLinkImpl =
+ ExternalDocumentationLink("https://developer.android.com/reference/")
+
+
+fun ExternalDocumentationLink.Companion.androidX(): ExternalDocumentationLinkImpl = ExternalDocumentationLink(
+ url = URL("https://developer.android.com/reference/kotlin/"),
+ packageListUrl = URL("https://developer.android.com/reference/androidx/package-list")
+)
-fun ExternalDocumentationLink.Companion.androidX(): ExternalDocumentationLinkImpl {
- return ExternalDocumentationLink(
- url = URL("https://developer.android.com/reference/kotlin/"),
- packageListUrl = URL("https://developer.android.com/reference/androidx/package-list")
- )
-}