aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/build.gradle1
-rw-r--r--core/src/main/kotlin/DokkaBootstrapImpl.kt11
2 files changed, 6 insertions, 6 deletions
diff --git a/core/build.gradle b/core/build.gradle
index 0008bfd7..4c140df3 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -47,6 +47,7 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit', version: kotlin_version
testCompile "com.nhaarman:mockito-kotlin-kt1.1:1.5.0"
+ implementation 'com.google.code.gson:gson:2.8.5'
testCompile ideaRT()
} \ No newline at end of file
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()
}