Skip to content

Are Android dynamic feature modules supported #441

@saihemanth121

Description

@saihemanth121

Hi, does Kover support Android Dynamic Feature Modules? When I add the plugin to a DFM in my multiproject and try to run feature:dynamicFeature:koverHtmlReportDebug, I get an error:

FAILURE: Build failed with an exception. * What went wrong: Task 'koverHtmlReportDebug' not found in project ':feature:dynamicFeature'. 

If I try to create a multiproject report in my app module, by using kover(project(":feature:dynamicFeature")) and running :app:koverHtmlReportDebug, I get below error:

FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:koverHtmlReportDebug'. > Could not resolve all task dependencies for configuration ':app:koverExternalArtifactsDebug'. > Could not resolve project :feature:dynamicFeature. Required by: project :app > The consumer was configured to find attribute 'kotlinx.kover.android.build-type' with value 'debug'. However we cannot choose between the following variants of project :feature:dynamicFeature: - benchmarkApiElements - benchmarkReverseMetadataElements - benchmarkRuntimeElements - debugApiElements - debugReverseMetadataElements - debugRuntimeElements - koverArtifact - releaseApiElements - releaseReverseMetadataElements - releaseRuntimeElements All of them match the consumer attributes: - Variant 'benchmarkApiElements' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Provides com.android.build.api.attributes.AgpVersionAttr '7.3.1' but the consumer didn't ask for it - Provides com.android.build.api.attributes.BuildTypeAttr 'benchmark' but the consumer didn't ask for it - Provides com.android.build.gradle.internal.attributes.VariantAttr 'benchmark' but the consumer didn't ask for it - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides org.gradle.category 'library' but the consumer didn't ask for it - Provides org.gradle.jvm.environment 'android' but the consumer didn't ask for it - Provides org.gradle.usage 'java-api' but the consumer didn't ask for it - Provides org.jetbrains.kotlin.platform.type 'androidJvm' but the consumer didn't ask for it - Variant 'benchmarkReverseMetadataElements' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Provides com.android.build.api.attributes.BuildTypeAttr 'benchmark' but the consumer didn't ask for it - Provides com.android.build.gradle.internal.attributes.VariantAttr 'benchmark' but the consumer didn't ask for it - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides org.gradle.usage 'android-reverse-meta-data' but the consumer didn't ask for it - Variant 'benchmarkRuntimeElements' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Provides com.android.build.api.attributes.AgpVersionAttr '7.3.1' but the consumer didn't ask for it - Provides com.android.build.api.attributes.BuildTypeAttr 'benchmark' but the consumer didn't ask for it - Provides com.android.build.gradle.internal.attributes.VariantAttr 'benchmark' but the consumer didn't ask for it - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides org.gradle.category 'library' but the consumer didn't ask for it - Provides org.gradle.jvm.environment 'android' but the consumer didn't ask for it - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it - Provides org.jetbrains.kotlin.platform.type 'androidJvm' but the consumer didn't ask for it - Variant 'debugApiElements' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Provides com.android.build.api.attributes.AgpVersionAttr '7.3.1' but the consumer didn't ask for it - Provides com.android.build.api.attributes.BuildTypeAttr 'debug' but the consumer didn't ask for it - Provides com.android.build.gradle.internal.attributes.VariantAttr 'debug' but the consumer didn't ask for it - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides org.gradle.category 'library' but the consumer didn't ask for it - Provides org.gradle.jvm.environment 'android' but the consumer didn't ask for it - Provides org.gradle.usage 'java-api' but the consumer didn't ask for it - Provides org.jetbrains.kotlin.platform.type 'androidJvm' but the consumer didn't ask for it - Variant 'debugReverseMetadataElements' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Provides com.android.build.api.attributes.BuildTypeAttr 'debug' but the consumer didn't ask for it - Provides com.android.build.gradle.internal.attributes.VariantAttr 'debug' but the consumer didn't ask for it - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides org.gradle.usage 'android-reverse-meta-data' but the consumer didn't ask for it - Variant 'debugRuntimeElements' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Provides com.android.build.api.attributes.AgpVersionAttr '7.3.1' but the consumer didn't ask for it - Provides com.android.build.api.attributes.BuildTypeAttr 'debug' but the consumer didn't ask for it - Provides com.android.build.gradle.internal.attributes.VariantAttr 'debug' but the consumer didn't ask for it - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides org.gradle.category 'library' but the consumer didn't ask for it - Provides org.gradle.jvm.environment 'android' but the consumer didn't ask for it - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it - Provides org.jetbrains.kotlin.platform.type 'androidJvm' but the consumer didn't ask for it - Variant 'koverArtifact' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides kotlinx.kover.project.path ':feature:dynamicFeature' but the consumer didn't ask for it - Provides kotlinx.kover.variant.name '' but the consumer didn't ask for it - Variant 'releaseApiElements' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Provides com.android.build.api.attributes.AgpVersionAttr '7.3.1' but the consumer didn't ask for it - Provides com.android.build.api.attributes.BuildTypeAttr 'release' but the consumer didn't ask for it - Provides com.android.build.gradle.internal.attributes.VariantAttr 'release' but the consumer didn't ask for it - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides org.gradle.category 'library' but the consumer didn't ask for it - Provides org.gradle.jvm.environment 'android' but the consumer didn't ask for it - Provides org.gradle.usage 'java-api' but the consumer didn't ask for it - Provides org.jetbrains.kotlin.platform.type 'androidJvm' but the consumer didn't ask for it - Variant 'releaseReverseMetadataElements' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Provides com.android.build.api.attributes.BuildTypeAttr 'release' but the consumer didn't ask for it - Provides com.android.build.gradle.internal.attributes.VariantAttr 'release' but the consumer didn't ask for it - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides org.gradle.usage 'android-reverse-meta-data' but the consumer didn't ask for it - Variant 'releaseRuntimeElements' capability myProject.feature:dynamicFeature:unspecified: - Unmatched attributes: - Provides com.android.build.api.attributes.AgpVersionAttr '7.3.1' but the consumer didn't ask for it - Provides com.android.build.api.attributes.BuildTypeAttr 'release' but the consumer didn't ask for it - Provides com.android.build.gradle.internal.attributes.VariantAttr 'release' but the consumer didn't ask for it - Doesn't say anything about kotlinx.kover.android.build-type (required 'debug') - Provides org.gradle.category 'library' but the consumer didn't ask for it - Provides org.gradle.jvm.environment 'android' but the consumer didn't ask for it - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it - Provides org.jetbrains.kotlin.platform.type 'androidJvm' but the consumer didn't ask for it 

The plugin works as expected for all non-DFM modules in my project.

Metadata

Metadata

Assignees

Labels

BugBug issue typeS: ready for releaseStatus: merged in the main branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions