Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark tasks as not compatible with the Gradle configuration cache #3070

Merged
merged 2 commits into from
Aug 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Loading