-
Notifications
You must be signed in to change notification settings - Fork 453
Description
Configuration cache is a new feature in Gradle that speeds up running repetitive tasks (during daily development) by storing the task graph on disk and loading it back. This requires certain actions from plugin authors to be compatible. For example not using specific types.
Describe the solution you'd like
With dokka, the problem is
- Task `:checkstyle:dokkaJavadoc` of type `org.jetbrains.dokka.gradle.DokkaTask`: cannot serialize object of type 'org.gradle.api.internal.artifacts.configurations.DefaultConfiguration', a subtype of 'org.gradle.api.artifacts.Configuration', as these are not supported with the configuration cache.
See https://docs.gradle.org/7.3/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
The solution to this is a bit of refactoring the task to use cacheable types.
The first example in the docs might help.
Describe alternatives you've considered
@3flex tried #1800, but that probably needs more work.
Right now if developers / CI ever wants to execute Dokka, they have to disable configuration caching, e.g. with --no-configuration-cache
.
Additional context
Repro:
- Project with dokka configured on it
- Run dokka with
--configuration-cache
on gradlew command line
Are you willing to provide a PR?
I don't have enough experience with this yet.