Checking dependencies doesn't know which variant to check for Android
Open
Nobody has claimed this yet.
bug
- Dominant language
- Kotlin
- Stars
- 109
- Forks
- 6
- Avg merge
- 11m
- Merged PRs (30d)
- 3
Description
Expected and Results
I guess we need to register a task per variant 🙈
* What went wrong:
Could not determine the dependencies of task ':openfeedback:tapmocCheckClassFileVersions'.
> Could not resolve all dependencies for configuration ':openfeedback:tapmocRuntimeDependencies'.
> Could not resolve project :openfeedback.
Required by:
project :openfeedback
> The consumer was configured to find a component for use during runtime. However we cannot choose between the following variants of project :openfeedback:
- debugRuntimeElements
- releaseRuntimeElements
All of them match the consumer attributes:
- Variant 'debugRuntimeElements' capability 'io.openfeedback:openfeedback:1.0.0-alpha.5-SNAPSHOT' declares a component for use during runtime:
- Unmatched attributes:
- Provides a library but the consumer didn't ask for it
- Provides attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.9.0' but the consumer didn't ask for it
- Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for it
- Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but the consumer didn't ask for it
Related environment and versions
No response
Reproduction steps
No response
Anything else?
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the tapmocCheckClassFileVersions task and the tapmocRuntimeDependencies configuration named in the failure, then inspect how Android debugRuntimeElements and releaseRuntimeElements are selected. Reproduce the dependency-resolution error and determine what variant-aware task behavior is required; done means the check resolves a single intended variant without the reported ambiguity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100