aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/DokkaBootstrap.kt6
-rw-r--r--core/src/main/kotlin/DokkaBootstrapImpl.kt22
-rw-r--r--core/src/main/kotlin/DokkaMultimoduleBootstrapImpl.kt7
3 files changed, 20 insertions, 15 deletions
diff --git a/core/src/main/kotlin/DokkaBootstrap.kt b/core/src/main/kotlin/DokkaBootstrap.kt
index b78eb9c6..ffaae03e 100644
--- a/core/src/main/kotlin/DokkaBootstrap.kt
+++ b/core/src/main/kotlin/DokkaBootstrap.kt
@@ -3,8 +3,6 @@ package org.jetbrains.dokka
import java.util.function.BiConsumer
interface DokkaBootstrap {
-
- fun configure(logger: BiConsumer<String, String>, serializedConfigurationJSON: String)
-
+ fun configure(serializedConfigurationJSON: String, logger: BiConsumer<String, String>)
fun generate()
-} \ No newline at end of file
+}
diff --git a/core/src/main/kotlin/DokkaBootstrapImpl.kt b/core/src/main/kotlin/DokkaBootstrapImpl.kt
index be3d6c9b..936fbe6c 100644
--- a/core/src/main/kotlin/DokkaBootstrapImpl.kt
+++ b/core/src/main/kotlin/DokkaBootstrapImpl.kt
@@ -37,6 +37,10 @@ fun parsePerPackageOptions(args: List<String>): List<PackageOptions> = args.map
}
+/**
+ * Accessed with reflection
+ */
+@Suppress("unused")
class DokkaBootstrapImpl : DokkaBootstrap {
class DokkaProxyLogger(val consumer: BiConsumer<String, String>) : DokkaLogger {
@@ -95,20 +99,18 @@ class DokkaBootstrapImpl : DokkaBootstrap {
return links
}
- val configurationWithLinks =
- configuration.copy(
- sourceSets =
- sourceSets.map {
- val links: List<ExternalDocumentationLinkImpl> =
- it.externalDocumentationLinks + defaultLinks(it)
- it.copy(externalDocumentationLinks = links)
- }
- )
+ val configurationWithLinks = configuration.copy(
+ sourceSets = sourceSets.map {
+ val links: List<ExternalDocumentationLinkImpl> =
+ it.externalDocumentationLinks + defaultLinks(it)
+ it.copy(externalDocumentationLinks = links)
+ }
+ )
generator = DokkaGenerator(configurationWithLinks, logger)
}
- override fun configure(logger: BiConsumer<String, String>, serializedConfigurationJSON: String) = configure(
+ override fun configure(serializedConfigurationJSON: String, logger: BiConsumer<String, String>) = configure(
DokkaProxyLogger(logger),
DokkaConfigurationImpl(serializedConfigurationJSON)
)
diff --git a/core/src/main/kotlin/DokkaMultimoduleBootstrapImpl.kt b/core/src/main/kotlin/DokkaMultimoduleBootstrapImpl.kt
index 70b99f8d..c0726584 100644
--- a/core/src/main/kotlin/DokkaMultimoduleBootstrapImpl.kt
+++ b/core/src/main/kotlin/DokkaMultimoduleBootstrapImpl.kt
@@ -1,3 +1,8 @@
+/**
+ * Accessed with reflection
+ */
+@file:Suppress("unused")
+
package org.jetbrains.dokka
import org.jetbrains.dokka.DokkaBootstrapImpl.DokkaProxyLogger
@@ -12,7 +17,7 @@ class DokkaMultimoduleBootstrapImpl : DokkaBootstrap {
generator = DokkaGenerator(configuration, logger)
}
- override fun configure(logger: BiConsumer<String, String>, serializedConfigurationJSON: String) = configure(
+ override fun configure(serializedConfigurationJSON: String, logger: BiConsumer<String, String>) = configure(
DokkaProxyLogger(logger),
DokkaConfigurationImpl(serializedConfigurationJSON)
)