-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged report with allProjects/subProjects fails if there is an empty project #706
Comments
Hi, e.g. kover {
merge {
subprojects {
// merge all project except :data
it.path != ":data"
}
}
} |
But what if I have tens of such subprojects? This solution doesn't scale well. |
What criteria do you use to describe an empty project, no source code files? |
Any static criteria can be used in filtering, for example kover {
merge {
subprojects {
// apply Kover only if src directory exists in subproject directory
it.layout.projectDirectory.dir("src").asFile.exists()
}
}
} |
I guess it can rely on the presence of the Kotlin plugin(s) in the subproject. Is there a point in applying the plugin to a non-Kotlin project? |
It is for this reason that it is not recommended to use the
So the conclusion is that with this approach it is necessary to write a filter that will be guided by the information that is available before the evaluation of a subproject. We can focus on indirect signs, such as the presence of the |
In general, the problem cannot be solved universally. |
Describe the bug
If the multi-module project has an empty project that serves only as an aggregate for several subprojects, the
merge
use-case becomes inconvenient to use.a) it creates empty
build
folders in such empty projects withkover/.artifact
b) it fails the build if repositories aren't configured in those empty projects
There is a workaround to apply dependency management on the build level in
settings.gradle.kts
, but as it is an incubating feature, it'd be good if it was possible without that.Errors
Expected behavior
Empty projects should be skipped when merging.
Reproducer
https://github.com/utikeev/kover-merge-issue
Try calling
./gradlew koverBinaryReport
.Environment
Notes
While I understand that the
merge
use-case is considered delicate and is not a recommended approach, it feels weird not to have a shortcut to easily merge coverage from all the projects included in the root build. Effectively duplicating the list of submodules that needs to be covered inside a merging module looks error-prone as now you've got to support two lists of submodules.As far as I understand, the experimental aggregated plugin is going to solve just that but feel free to correct me if I'm wrong here.
The text was updated successfully, but these errors were encountered: