Project Isolation support #144
Labels
Feature
Feature request issue type
Kover Gradle Plugin
S: in progress
Status: implementing or design in process
With regards to project isolation support (docs), this seems to be a bit of a problem. One project should not access another project.
kotlinx-kover/src/main/kotlin/kotlinx/kover/KoverPlugin.kt
Lines 48 to 50 in e1f3fbc
Above, the root project is accessing other projects. I somewhat solve this problem by having separate plugins:
com.myPlugin.subproject
is applied to subprojects, andcom.myPlugin.aggregator
is responsible for aggregating the output from subprojects that applycom.myPlugin.subproject
.Excerpt from Square's herding elephants article on why this feature is important
Even though Project Isolation is experimental (and in most cases, not yet practical) - it's important that Gradle plugins (like Kover) design with Project Isolation in mind. For example, having separate plugins and only using
allprojects/subprojects { }
(if you must) in a dedicated.aggregator
plugin. That way, when Gradle releases APIs to avoid theallprojects/subprojects { }
APIs, the migration is trivial.note: I'd definitely recommend reaching out to the Gradle team to see what they recommend here
The text was updated successfully, but these errors were encountered: