aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/DokkaBootstrapImpl.kt32
-rw-r--r--core/src/main/kotlin/defaultConfiguration.kt2
2 files changed, 22 insertions, 12 deletions
diff --git a/core/src/main/kotlin/DokkaBootstrapImpl.kt b/core/src/main/kotlin/DokkaBootstrapImpl.kt
index fc1b6926..f164a3c1 100644
--- a/core/src/main/kotlin/DokkaBootstrapImpl.kt
+++ b/core/src/main/kotlin/DokkaBootstrapImpl.kt
@@ -20,7 +20,13 @@ fun parsePerPackageOptions(arg: String): List<PackageOptions> {
val reportUndocumented = args.find { it.endsWith("warnUndocumented") }?.startsWith("+") ?: true
val privateApi = args.find { it.endsWith("privateApi") }?.startsWith("+") ?: false
val suppress = args.find { it.endsWith("suppress") }?.startsWith("+") ?: false
- PackageOptionsImpl(prefix, includeNonPublic = privateApi, reportUndocumented = reportUndocumented, skipDeprecated = !deprecated, suppress = suppress)
+ PackageOptionsImpl(
+ prefix,
+ includeNonPublic = privateApi,
+ reportUndocumented = reportUndocumented,
+ skipDeprecated = !deprecated,
+ suppress = suppress
+ )
}
}
@@ -52,10 +58,11 @@ class DokkaBootstrapImpl : DokkaBootstrap {
override fun report() {
if (warningsCount > 0 || errorsCount > 0) {
- println("Generation completed with $warningsCount warning" +
- (if(DokkaConsoleLogger.warningsCount == 1) "" else "s") +
- " and $errorsCount error" +
- if(DokkaConsoleLogger.errorsCount == 1) "" else "s"
+ println(
+ "Generation completed with $warningsCount warning" +
+ (if (DokkaConsoleLogger.warningsCount == 1) "" else "s") +
+ " and $errorsCount error" +
+ if (DokkaConsoleLogger.errorsCount == 1) "" else "s"
)
} else {
println("generation completed successfully")
@@ -83,10 +90,11 @@ class DokkaBootstrapImpl : DokkaBootstrap {
}
val configurationWithLinks =
- configuration.copy(passesConfigurations =
- passesConfigurations
- .map {
- val links: List<ExternalDocumentationLinkImpl> = it.externalDocumentationLinks + defaultLinks(it)
+ configuration.copy(
+ passesConfigurations =
+ passesConfigurations.map {
+ val links: List<ExternalDocumentationLinkImpl> =
+ it.externalDocumentationLinks + defaultLinks(it)
it.copy(externalDocumentationLinks = links)
}
)
@@ -94,8 +102,10 @@ class DokkaBootstrapImpl : DokkaBootstrap {
generator = DokkaGenerator(configurationWithLinks, logger)
}
- override fun configure(logger: BiConsumer<String, String>, serializedConfigurationJSON: String)
- = configure(DokkaProxyLogger(logger), gson.fromJson(serializedConfigurationJSON, DokkaConfigurationImpl::class.java))
+ override fun configure(logger: BiConsumer<String, String>, serializedConfigurationJSON: String) = configure(
+ DokkaProxyLogger(logger),
+ gson.fromJson(serializedConfigurationJSON, DokkaConfigurationImpl::class.java)
+ )
override fun generate() = generator.generate()
}
diff --git a/core/src/main/kotlin/defaultConfiguration.kt b/core/src/main/kotlin/defaultConfiguration.kt
index 148bf830..b0c12015 100644
--- a/core/src/main/kotlin/defaultConfiguration.kt
+++ b/core/src/main/kotlin/defaultConfiguration.kt
@@ -10,7 +10,7 @@ data class DokkaConfigurationImpl(
override val cacheRoot: String?,
override val impliedPlatforms: List<String>,
override val passesConfigurations: List<PassConfigurationImpl>,
- override val pluginsClasspath: List<File>
+ override var pluginsClasspath: List<File>
) : DokkaConfiguration
data class PassConfigurationImpl (