Skip to content

Commit

Permalink
Mark tasks as not compatible with the Gradle configuration cache (#3070)
Browse files Browse the repository at this point in the history
  • Loading branch information
BoD committed Aug 25, 2023
1 parent 08ff531 commit bec2cac
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -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() {
Expand Down Expand Up @@ -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> {
Expand Down

0 comments on commit bec2cac

Please sign in to comment.