Does Kotlin Gradle plugin support configuration ca...
# gradle
p
Does Kotlin Gradle plugin support configuration cache? Getting
Copy code
Task `:my-project:jsBrowserProductionWebpack` of type `org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
h
JVM does, the multiplatform and especially js does not.
🙏 1
a
As of 1.9.20 KGP should fully support configuration cache for all multiplatform targets https://kotlinlang.org/docs/whatsnew1920.html#full-support-for-the-gradle-configuration-cache-in-kotlin-multiplatform If you find otherwise please share more details, either here or in YouTrack https://kotl.in/issue.
🙌 1
❤️ 2
p
Thanks! Found the cause for my issue (just FYI) - i'm using project instance in
Copy code
browser { 
  commonWebpackConfig {
     configDirectory = File(
            project.rootDir,  // using project here causes error for configuration cache 
            "web/webpack")
  }
}
👍 1
Copy code
browser { 
  val projectRootDir = project.rootDir // this works even inside browser section 
  commonWebpackConfig {
     configDirectory = File(
            projectRootDir, 
            "web/webpack")
  }
}
👍 1