From 24bc551f38cb8ce6c983d19832b69ef24dc8674e Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Tue, 18 Jun 2019 18:12:30 +0200 Subject: Fix Gradle Incremental Build bug on 2.14.1 --- .../kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 4 +- .../dokka/gradle/configurationImplementations.kt | 52 +++++++++++----------- 2 files changed, 29 insertions(+), 27 deletions(-) (limited to 'runners/gradle-plugin/src/main/kotlin') 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 d15cf932..fc447225 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 @@ -70,12 +70,12 @@ open class DokkaTask : DefaultTask() { var multiplatform: Set @Suppress("UNCHECKED_CAST") - @Input get() = (DslObject(this).extensions.getByName(MULTIPLATFORM_EXTENSION_NAME) as NamedDomainObjectContainer).toSet() + @Nested get() = (DslObject(this).extensions.getByName(MULTIPLATFORM_EXTENSION_NAME) as NamedDomainObjectContainer).toSet() internal set(value) = DslObject(this).extensions.add(MULTIPLATFORM_EXTENSION_NAME, value) var configuration: GradlePassConfigurationImpl @Suppress("UNCHECKED_CAST") - @Input get() = DslObject(this).extensions.getByType(GradlePassConfigurationImpl::class.java) + @Nested get() = DslObject(this).extensions.getByType(GradlePassConfigurationImpl::class.java) internal set(value) = DslObject(this).extensions.add(CONFIGURATION_EXTENSION_NAME, value) protected var externalDocumentationLinks: MutableList = 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 09183858..0364985d 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 @@ -2,6 +2,8 @@ package org.jetbrains.dokka.gradle import groovy.lang.Closure import org.gradle.api.Action +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Optional import org.gradle.util.ConfigureUtil import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.DokkaConfiguration.* @@ -21,31 +23,31 @@ class GradleSourceRootImpl: SourceRoot, Serializable { override fun toString(): String = path } -open class GradlePassConfigurationImpl(@Transient val name: String = ""): PassConfiguration, Serializable { - override var classpath: List = emptyList() - override var moduleName: String = "" - override var sourceRoots: MutableList = mutableListOf() - override var samples: List = emptyList() - override var includes: List = emptyList() - override var includeNonPublic: Boolean = false - override var includeRootPackage: Boolean = false - override var reportUndocumented: Boolean = false - override var skipEmptyPackages: Boolean = false - override var skipDeprecated: Boolean = false - override var jdkVersion: Int = 6 - override var sourceLinks: MutableList = mutableListOf() - override var perPackageOptions: MutableList = mutableListOf() - override var externalDocumentationLinks: MutableList = mutableListOf() - override var languageVersion: String? = null - override var apiVersion: String? = null - override var noStdlibLink: Boolean = false - override var noJdkLink: Boolean = false - override var suppressedFiles: List = emptyList() - override var collectInheritedExtensionsFromLibraries: Boolean = false - override var analysisPlatform: Platform = Platform.DEFAULT - var platform: String? = null - override var targets: List = emptyList() - override var sinceKotlin: String? = null +open class GradlePassConfigurationImpl(@Transient val name: String = ""): PassConfiguration { + @Input @Optional override var classpath: List = emptyList() + @Input override var moduleName: String = "" + @Input override var sourceRoots: MutableList = mutableListOf() + @Input override var samples: List = emptyList() + @Input override var includes: List = emptyList() + @Input override var includeNonPublic: Boolean = false + @Input override var includeRootPackage: Boolean = false + @Input override var reportUndocumented: Boolean = false + @Input override var skipEmptyPackages: Boolean = false + @Input override var skipDeprecated: Boolean = false + @Input override var jdkVersion: Int = 6 + @Input override var sourceLinks: MutableList = mutableListOf() + @Input override var perPackageOptions: MutableList = mutableListOf() + @Input override var externalDocumentationLinks: MutableList = mutableListOf() + @Input @Optional override var languageVersion: String? = null + @Input @Optional override var apiVersion: String? = null + @Input override var noStdlibLink: Boolean = false + @Input override var noJdkLink: Boolean = false + @Input override var suppressedFiles: List = emptyList() + @Input override var collectInheritedExtensionsFromLibraries: Boolean = false + @Input override var analysisPlatform: Platform = Platform.DEFAULT + @Input @Optional var platform: String? = null + @Input override var targets: List = emptyList() + @Input @Optional override var sinceKotlin: String? = null fun sourceRoot(c: Closure) { val configured = ConfigureUtil.configure(c, GradleSourceRootImpl()) -- cgit