aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-04-08 17:22:04 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-04-08 17:22:04 +0200
commit49800d9c8276ec8851bcc3b181563cd6e0f8f4b9 (patch)
tree16462fc1425e5d53cbc53fcd4d0bacd3435fde5c /core/src
parent9975b7209f55edfe7e2f1a48e8d1f8b3c522e71a (diff)
downloaddokka-49800d9c8276ec8851bcc3b181563cd6e0f8f4b9.tar.gz
dokka-49800d9c8276ec8851bcc3b181563cd6e0f8f4b9.tar.bz2
dokka-49800d9c8276ec8851bcc3b181563cd6e0f8f4b9.zip
Implement Gradle Pass Configuration
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/DokkaBootstrapImpl.kt11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/src/main/kotlin/DokkaBootstrapImpl.kt b/core/src/main/kotlin/DokkaBootstrapImpl.kt
index 2077458a..b48b62d4 100644
--- a/core/src/main/kotlin/DokkaBootstrapImpl.kt
+++ b/core/src/main/kotlin/DokkaBootstrapImpl.kt
@@ -1,8 +1,6 @@
package org.jetbrains.dokka
-import com.intellij.openapi.util.Pass
-import kotlinx.serialization.*
-import kotlinx.serialization.json.Json
+import com.google.gson.Gson
import org.jetbrains.dokka.DokkaConfiguration.PackageOptions
import java.util.function.BiConsumer
@@ -41,9 +39,7 @@ class DokkaBootstrapImpl : DokkaBootstrap {
}
lateinit var generator: DokkaGenerator
-
- override fun configure(logger: BiConsumer<String, String>, serializedConfigurationJSON: String)
- = configure(DokkaProxyLogger(logger), Json.parse(DokkaConfigurationImpl.serializer(), serializedConfigurationJSON))
+ val gson = Gson()
fun configure(logger: DokkaLogger, configuration: DokkaConfigurationImpl) = with(configuration) {
@@ -73,5 +69,8 @@ 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 generate() = generator.generate()
}