aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'runners/gradle-plugin/src/main')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt2
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt6
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt6
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt6
4 files changed, 9 insertions, 11 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
index 846f021c..1269b305 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
@@ -18,7 +18,7 @@ abstract class AbstractDokkaTask : DefaultTask(), Configurable {
var outputDirectory: String = defaultDokkaOutputDirectory().absolutePath
@Input
- override val pluginsConfiguration: Map<String, String> = mutableMapOf()
+ override val pluginsConfiguration: MutableMap<String, String> = mutableMapOf()
@Classpath
val plugins: Configuration = project.maybeCreateDokkaPluginConfiguration(name)
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt
index 6fd58afe..986b883a 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt
@@ -1,11 +1,10 @@
package org.jetbrains.dokka.gradle
-import com.google.gson.GsonBuilder
-import org.gradle.api.plugins.JavaBasePlugin
import org.gradle.api.plugins.JavaBasePlugin.DOCUMENTATION_GROUP
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
import org.jetbrains.dokka.plugability.Configurable
+import org.jetbrains.dokka.toJsonString
open class DokkaMultimoduleTask : AbstractDokkaTask(), Configurable {
@@ -23,9 +22,8 @@ open class DokkaMultimoduleTask : AbstractDokkaTask(), Configurable {
override fun generate() {
val bootstrap = DokkaBootstrap("org.jetbrains.dokka.DokkaMultimoduleBootstrapImpl")
- val gson = GsonBuilder().setPrettyPrinting().create()
val configuration = getConfiguration()
- bootstrap.configure(gson.toJson(configuration)) { level, message ->
+ bootstrap.configure(configuration.toJsonString()) { level, message ->
when (level) {
"debug" -> logger.debug(message)
"info" -> logger.info(message)
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
index 0d7e74a3..2253a975 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
@@ -1,6 +1,5 @@
package org.jetbrains.dokka.gradle
-import com.google.gson.GsonBuilder
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.Project
import org.gradle.api.Task
@@ -15,6 +14,7 @@ import org.jetbrains.dokka.Platform
import org.jetbrains.dokka.ReflectDsl
import org.jetbrains.dokka.ReflectDsl.isNotInstance
import org.jetbrains.dokka.gradle.ConfigurationExtractor.PlatformData
+import org.jetbrains.dokka.toJsonString
import java.io.File
import java.util.concurrent.Callable
@@ -123,9 +123,7 @@ open class DokkaTask : AbstractDokkaTask() {
outputDiagnosticInfo = true
val bootstrap = DokkaBootstrap("org.jetbrains.dokka.DokkaBootstrapImpl")
- bootstrap.configure(
- GsonBuilder().setPrettyPrinting().create().toJson(configuration)
- ) { level, message ->
+ bootstrap.configure(configuration.toJsonString()) { level, message ->
when (level) {
"debug" -> logger.debug(message)
"info" -> logger.info(message)
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt
index b6b8399c..84f35cb4 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt
@@ -3,6 +3,7 @@
package org.jetbrains.dokka.gradle
import com.android.build.gradle.api.AndroidSourceSet
+import com.fasterxml.jackson.annotation.JsonIgnore
import groovy.lang.Closure
import org.gradle.api.Action
import org.gradle.api.Project
@@ -34,8 +35,8 @@ class GradleSourceRootImpl : SourceRoot, Serializable {
}
open class GradleDokkaSourceSet constructor(
- @Transient @get:Input val name: String,
- @Transient @get:Internal internal val project: Project
+ @get:JsonIgnore @Transient @get:Input val name: String,
+ @get:JsonIgnore @Transient @get:Internal internal val project: Project
) : DokkaSourceSet {
@Input
@@ -117,6 +118,7 @@ open class GradleDokkaSourceSet constructor(
@Optional
var platform: String? = null
+ @JsonIgnore
@Internal
@Transient
var collectKotlinTasks: (() -> List<Any?>?)? = null