Skip to content

Call to getProject in constructor of JavaModuleDependenciesExtension causes 'Accessing non-serializable type' error, only when... #209

@jjohannes

Description

@jjohannes
  • id("org.gradlex.java-module-dependencies") is applied in pre-compiled Kotlin DSL plugin
  • the plugins are compiled stand alone (not through includeBuild)
  • only when building with a certain empty cache - successive runs (even with clean) work without issues

This should not happen as the constructor runs during configuration time and it should be okay to do what we do. Still, we can probably avoid it by getting the rootDir earlier and injecting it.

https://scans.gradle.com/s/v2rdyho5f23rs/failures

Reproduce:

  • Have a build wit the above described condition
  • Run with empty Gradle user home

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions