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

Consider supporting Gradle's configuration cache #1217

Open
eskatos opened this issue Jul 23, 2020 · 7 comments · May be fixed by #2499
Open

Consider supporting Gradle's configuration cache #1217

eskatos opened this issue Jul 23, 2020 · 7 comments · May be fixed by #2499
Assignees
Labels
enhancement An issue for a feature or an overall improvement runner: gradle plugin v2 Issues fixed by Dokka Gradle Plugin v2 - see https://github.com/Kotlin/dokka/issues/3131 runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin
Milestone

Comments

@eskatos
Copy link
Contributor

eskatos commented Jul 23, 2020

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 eskatos added the enhancement An issue for a feature or an overall improvement label Jul 23, 2020
@eskatos
Copy link
Contributor Author

eskatos commented Jul 23, 2020

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.

@sellmair
Copy link
Member

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

@sellmair sellmair added the runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin label Jul 23, 2020
@eskatos
Copy link
Contributor Author

eskatos commented Aug 14, 2020

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.

@3flex
Copy link
Contributor

3flex commented Mar 20, 2021

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.

@Classpath
val plugins: Configuration = project.maybeCreateDokkaPluginConfiguration(name)
@Classpath
val runtime: Configuration = project.maybeCreateDokkaRuntimeConfiguration(name)

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.

@JavierSegoviaCordoba
Copy link
Contributor

Any new update?

SimonMarquis added a commit to SimonMarquis/SealedObjectInstances that referenced this issue Oct 18, 2022
SimonMarquis added a commit to SimonMarquis/SealedObjectInstances that referenced this issue Feb 3, 2023
SimonMarquis added a commit to SimonMarquis/SealedObjectInstances that referenced this issue Feb 3, 2023
SimonMarquis added a commit to SimonMarquis/SealedObjectInstances that referenced this issue Feb 3, 2023
SimonMarquis added a commit to SimonMarquis/SealedObjectInstances that referenced this issue Feb 3, 2023
SimonMarquis added a commit to SimonMarquis/SealedObjectInstances that referenced this issue Feb 3, 2023
@IgnatBeresnev IgnatBeresnev removed this from the Stable milestone Feb 24, 2023
rfc2822 added a commit to bitfireAT/ical4android that referenced this issue May 10, 2023
@emartynov
Copy link

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

@IgnatBeresnev IgnatBeresnev added this to the Gradle runner 2.0 milestone Aug 17, 2023
@adam-enko adam-enko added the runner: gradle plugin v2 Issues fixed by Dokka Gradle Plugin v2 - see https://github.com/Kotlin/dokka/issues/3131 label Aug 28, 2024
@adam-enko
Copy link
Member

Hi all, I have an update.

We're planning to release a new version of Dokka Gradle Plugin (DGPv2 for short) in the Dokka 2.0.0 release. DGPv2 is based on Dokkatoo. The current Dokka Gradle Plugin (DGPv1) will become deprecated.

DGPv2 fully supports configuration cache and build cache!

We'll be releasing a version for previewing soon, along with a migration guide. So, watch this space...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An issue for a feature or an overall improvement runner: gradle plugin v2 Issues fixed by Dokka Gradle Plugin v2 - see https://github.com/Kotlin/dokka/issues/3131 runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants