-
Notifications
You must be signed in to change notification settings - Fork 411
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
Support Gradle Configuration cache #2231
Comments
Is this a duplicate of #1217? |
Looks like it, except the "consider" part |
For reference, here's what I had in Gradle 8.3, dokka 1.9.0
As a workaround one can do the following : tasks
+ withType<DokkaTask>().configureEach {
+ notCompatibleWithConfigurationCache("https://github.com/Kotlin/dokka/issues/2231")
+ }
} |
This workaround won't be necessary on the next version as it will be automatically flagged as not compatible with CC (until it is fully supported): |
Is this not included in the latest release? I still get the error and have to use the workaround: tasks.withType<DokkaTask>().configureEach {
notCompatibleWithConfigurationCache("https://github.com/Kotlin/dokka/issues/2231")
}
My config is essentially: val dokkaHtml by tasks.getting(org.jetbrains.dokka.gradle.DokkaTask::class)
val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
dependsOn(dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaHtml.outputDirectory)
} |
@CharlieTap Maybe |
Hi all, thanks for the feedback. Supporting Configuration Cache (and all other upcoming Gradle features) is important, so Dokka Gradle Plugin will support it in Dokka's 2.0 release. We'll use #1217 to keep track of the request for CC support (simply because since it was made first). |
Duplicate of #1217 |
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
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:
--configuration-cache
on gradlew command lineAre you willing to provide a PR?
I don't have enough experience with this yet.
The text was updated successfully, but these errors were encountered: