aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main/kotlin/org/jetbrains
diff options
context:
space:
mode:
authorBenoit Lubek <BoD@JRAF.org>2023-08-25 20:03:04 +0200
committerGitHub <noreply@github.com>2023-08-25 20:03:04 +0200
commitbec2cac91726e52884329e7997207e9777abaab7 (patch)
tree99865ee73e88934500dbb0258e5bef72b74d92e1 /runners/gradle-plugin/src/main/kotlin/org/jetbrains
parent08ff531ca397458e2bf7c1039422231246a651f5 (diff)
downloaddokka-bec2cac91726e52884329e7997207e9777abaab7.tar.gz
dokka-bec2cac91726e52884329e7997207e9777abaab7.tar.bz2
dokka-bec2cac91726e52884329e7997207e9777abaab7.zip
Mark tasks as not compatible with the Gradle configuration cache (#3070)
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/org/jetbrains')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt
index 066374e5..1f679da8 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt
@@ -23,6 +23,7 @@ import org.jetbrains.dokka.plugability.DokkaPlugin
import java.util.concurrent.atomic.AtomicReference
import java.util.function.BiConsumer
import kotlin.reflect.full.createInstance
+import kotlin.reflect.full.memberFunctions
@DisableCachingByDefault(because = "Abstract super-class, not to be instantiated directly")
abstract class AbstractDokkaTask : DefaultTask() {
@@ -232,6 +233,11 @@ abstract class AbstractDokkaTask : DefaultTask() {
init {
group = JavaBasePlugin.DOCUMENTATION_GROUP
+ // notCompatibleWithConfigurationCache was introduced in Gradle 7.4
+ val containsNotCompatibleWithConfigurationCache = this::class.memberFunctions.any { it.name == "notCompatibleWithConfigurationCache" && it.parameters.firstOrNull()?.name == "reason" }
+ if (containsNotCompatibleWithConfigurationCache) {
+ super.notCompatibleWithConfigurationCache("Dokka tasks are not yet compatible with the Gradle configuration cache. See https://github.com/Kotlin/dokka/issues/1217")
+ }
}
internal fun buildPluginsConfiguration(): List<PluginConfigurationImpl> {