This message was deleted.
# community-support
s
This message was deleted.
j
Something so, thinking in project isolation support
e
even if you nest it that way, afterProject runs for all projects, not just rootProject
j
yeah but I need to add the rest of projects to the root one, I can just do if rootProject != project so rootProject doesn’t add itself
e
oh I see what you're trying to do. IMO that's a bad idea for other reasons: you should be explicit about your real dependencies, so that non-api changes can avoid unnecessary recompiles
j
That was indeed a sample, the real plan is with the new Dokka and Kover approach which requires to add all projects to the root one in order to get the merged report.
Copy code
gradle.rootProject {
  val rootProject = this
  gradle.afterProject {
    val project = this
    if (rootProject == project) return
    rootProject.dependencies {
      if (project.pluginManager.hasPlugin("org.jetbrains.kotlinx.kover") {
        add("kover", project)
      }
      // same for Dokka
    }
  }
}