dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Consider supporting Gradle's configuration cache

Open eskatos opened this issue 5 years ago • 7 comments

The configuration cache is a feature that significantly improves build performance by caching the result of the configuration phase and reusing this for subsequent builds.

Implementing support for the configuration cache in this plugin would improve users experience.

See https://docs.gradle.org/nightly/userguide/configuration_cache.html

The configuration cache is introduced in Gradle 6.6. This can already be tested using 6.6-rc-2.

eskatos avatar Jul 23 '20 09:07 eskatos

Given this plugin is currently being deeply reworked I didn't bother reporting what exact issues the "old" dokka or the "new" dokka have. Running a build with --configuration-cache will produce a report of the found problems.

eskatos avatar Jul 23 '20 09:07 eskatos

This is awesome. We try to implement this (probably even with #1194 )

sellmair avatar Jul 23 '20 13:07 sellmair

FYI, Kotlin master branch should now work with the configuration cache without emitting problems. You can use dev builds >= 1.4.20-dev-3361 in your tests.

eskatos avatar Aug 14 '20 07:08 eskatos

There are still a couple of warnings when using the configuration cache with dokka plugin. The configuration cache report points to plugins and runtime properties in AbstractDokkaTask, because Configuration type is not serializable.

https://github.com/Kotlin/dokka/blob/ac4b818a8616e4de8f702167fe6ddbe911df5d24/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt#L70-L74

I think the best thing is to setup the configurations when the tasks are created and set the classpath files there, but I'm not familiar with the dokka Gradle plugin internals and it's a bit more complex than I'm comfortable with otherwise I would attempt the change. But if runtime and plugins can be changed to FileCollection or ConfigurableFileCollection type then configuration cache should then be able to handle it.

3flex avatar Mar 20 '21 00:03 3flex

Any new update?

JavierSegoviaCordoba avatar Jul 19 '22 11:07 JavierSegoviaCordoba

It looks like there is no update on the configuration cache yet.

emartynov avatar Jun 06 '23 08:06 emartynov