diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-06-18 17:44:12 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-06-18 17:44:12 +0200 |
commit | ac4d4db037930e266a1a6d27996cd16928395eb1 (patch) | |
tree | 4e200ba1fa883715778a63fbf1bb3493f3aac5e9 /runners/gradle-plugin/src/main/kotlin | |
parent | 77cc7997ee93eef9b307984b49895220be355aea (diff) | |
download | dokka-ac4d4db037930e266a1a6d27996cd16928395eb1.tar.gz dokka-ac4d4db037930e266a1a6d27996cd16928395eb1.tar.bz2 dokka-ac4d4db037930e266a1a6d27996cd16928395eb1.zip |
Fix NotSerializableException
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
3 files changed, 7 insertions, 8 deletions
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 7d8fd309..d15cf932 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 @@ -68,14 +68,14 @@ open class DokkaTask : DefaultTask() { @Input var cacheRoot: String? = null - var multiplatform: NamedDomainObjectContainer<GradlePassConfigurationImpl> + var multiplatform: Set<GradlePassConfigurationImpl> @Suppress("UNCHECKED_CAST") - @Input get() = DslObject(this).extensions.getByName(MULTIPLATFORM_EXTENSION_NAME) as NamedDomainObjectContainer<GradlePassConfigurationImpl> + @Input get() = (DslObject(this).extensions.getByName(MULTIPLATFORM_EXTENSION_NAME) as NamedDomainObjectContainer<GradlePassConfigurationImpl>).toSet() internal set(value) = DslObject(this).extensions.add(MULTIPLATFORM_EXTENSION_NAME, value) var configuration: GradlePassConfigurationImpl @Suppress("UNCHECKED_CAST") - @Input get() = DslObject(this).extensions.getByName(CONFIGURATION_EXTENSION_NAME) as GradlePassConfigurationImpl + @Input get() = DslObject(this).extensions.getByType(GradlePassConfigurationImpl::class.java) internal set(value) = DslObject(this).extensions.add(CONFIGURATION_EXTENSION_NAME, value) protected var externalDocumentationLinks: MutableList<DokkaConfiguration.ExternalDocumentationLink> = mutableListOf() 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 7fec7d24..09183858 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 @@ -92,13 +92,13 @@ open class GradlePassConfigurationImpl(@Transient val name: String = ""): PassCo } } -class GradleSourceLinkDefinitionImpl : SourceLinkDefinition { +class GradleSourceLinkDefinitionImpl : SourceLinkDefinition, Serializable { override var path: String = "" override var url: String = "" override var lineSuffix: String? = null } -class GradleExternalDocumentationLinkImpl : ExternalDocumentationLink { +class GradleExternalDocumentationLinkImpl : ExternalDocumentationLink, Serializable { override var url: URL = URL("http://") override var packageListUrl: URL = URL("http://") } @@ -112,7 +112,7 @@ class GradleDokkaConfigurationImpl: DokkaConfiguration { override var passesConfigurations: List<GradlePassConfigurationImpl> = emptyList() } -class GradlePackageOptionsImpl: PackageOptions { +class GradlePackageOptionsImpl: PackageOptions, Serializable { override var prefix: String = "" override val includeNonPublic: Boolean = false override val reportUndocumented: Boolean = true diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt index a87b803c..24fe9df1 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt @@ -34,8 +34,7 @@ open class DokkaPlugin : Plugin<Project> { } project.tasks.withType(DokkaTask::class.java) { task -> - val passConfiguration = project.container(GradlePassConfigurationImpl::class.java) - task.multiplatform = passConfiguration + task.multiplatform = project.container(GradlePassConfigurationImpl::class.java) task.configuration = GradlePassConfigurationImpl() task.dokkaRuntime = dokkaRuntimeConfiguration task.defaultDokkaRuntime = defaultDokkaRuntimeConfiguration |