This message was deleted.
# configuration-cache
s
This message was deleted.
a
there’s a failing TestKit in https://github.com/adamko-dev/dokkatoo/pull/55
the full config cache failure message doesn’t contain enough useful information, just a mishmash of random fields/beans, and I can’t see how it’s related to the plugin code
Copy code
⌄ task:dokkatooGenerateModuleHtml of type dev.adamko.dokkatoo.tasks.DokkatooGenerateTask
  ⌄ field__dokkaSourceSets__ of dev.adamko.dokkatoo.tasks.DokkatooGenerateTask
    ⌄ bean of type org.gradle.api.internal.FactoryNamedDomainObjectContainer
      ⌄ fieldeventRegister of org.gradle.api.internal.FactoryNamedDomainObjectContainer
        ⌄ bean of type org.gradle.api.internal.collections.DefaultCollectionEventRegister
          ⌄ fieldaddActions of org.gradle.api.internal.collections.DefaultCollectionEventRegister
            ⌄ bean of type org.gradle.internal.ImmutableActionSet$SetWithFewActions
              ⌄ fieldactions of org.gradle.internal.ImmutableActionSet$SetWithFewActions
                ⌄ bean of type org.gradle.api.internal.DefaultMutationGuard$1
                  ⌄ fieldval$action of org.gradle.api.internal.DefaultMutationGuard$1
                    ⌄ bean of type org.gradle.api.internal.DefaultMutationGuard$1
                      ⌄ fieldval$action of org.gradle.api.internal.DefaultMutationGuard$1
                        ⌄ bean of type org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction
                          ⌄ fielddelegate of org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction
                            ⌄ bean of type org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1
                              ⌄ fieldval$action of org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1
                                ⌄ bean of type Build_gradle$4$5$1
                                  ⌄ fieldthis$0 of Build_gradle$4$5$1
                                    ■:warning:cannot serialize Gradle script object references as these are not supported with the configuration cache.[ ?](<https://docs.gradle.org/8.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types>)
I think this problem was caused by using
Project.file()
inside of a
configureEach {}
block
Copy code
tasks {
  dokkatooGenerateModuleHtml.configure {
    // define a val to be compatible with CC
    val srcMainKotlinDir = layout.projectDirectory.dir("src/main/kotlin")

    dokkaSourceSets.configureEach {
      sourceLink {
        //localDirectory.set(file("src/main/kotlin")) // causes CC error
        localDirectory.set(srcMainKotlinDir)
    }   }
    }
}
v
That and
version
in the original code
a
thanks @Vampire 🙏
👌 1