Closed igorromcy closed 8 months ago
Hi, try this way
kover {
merge {
allProjects()
createVariant("coverage") {
it.addWithDependencies(["debug", "fastDebug"] as String[], false)
}
}
}
*an String array is expected, not a list
looks better, but for some reason doesn't find the variant I'm looking for:
A problem occurred configuring root project 'android'.
> Could not find the provided variant 'debug' to create a custom variant 'coverage'.
Specify an existing 'jvm' variant or Android build variant name, or delete the merge.
even passing two variants, is it searching for only one?
removing the variant block (just to see what happens) gives me the same error over many modules:
> Task :feature:feature1:kaptDebugUnitTestKotlin
warning: The following options were not recognized by any processor: '[dagger.hilt.disableModulesHaveInstallInCheck,
dagger.fastInit, dagger.hilt.android.internal.disableAndroidSuperclassValidation, dagger.hilt.android.internal.projectType,
dagger.hilt.internal.useAggregatingRootProcessor, dagger.validateTransitiveComponentDependencies,
dagger.strictMultibindingValidation, dagger.hilt.disableCrossCompilationRootValidation, kapt.kotlin.generated]'
looks better, but for some reason doesn't find the variant I'm looking for:
is Android build variant debug
exists in all projects of a build including root project?
If not, you should limit merged projects (e.g. by subprojects()
instead of allProjects()
) or add variant optionally
kover {
merge {
allProjects()
createVariant("coverage") {
it.add(["debug", "fastDebug"] as String[], true)
}
}
}
that worked, amazing!
thank you for the support!
Describe the bug I'm trying to use the latest Kover version since it has some great improvements around the single report approach and I'm facing this weird error when I'm trying to add a variant. Is that something inside the library or I might be missing some kind of configuration?
Errors
Code I'm applying the plugin to my build.gradle file
and setting the config:
Environment