ritesh
08/20/2025, 6:16 PMritesh
08/20/2025, 7:30 PMCaused by: org.gradle.internal.component.resolution.failure.exception.ArtifactSelectionException: Found multiple transformation chains that produce a variant of 'project :primitives:cart-checkout' with requested attributes:
- artifactType 'jar-for-dagger'
- com.android.build.api.attributes.AgpVersionAttr '8.10.1'
- com.android.build.api.attributes.BuildTypeAttr 'release'
- org.gradle.category 'library'
- org.gradle.jvm.environment 'android'
- org.gradle.usage 'java-runtime'
- org.jetbrains.kotlin.platform.type 'androidJvm'
Found the following transformation chains:
- From configuration ':primitives:cart-checkout:releaseRuntimeElements' variant 'android-classes-jar':
- With source attributes:
- artifactType 'android-classes-jar'
- com.android.build.api.attributes.AgpVersionAttr '8.10.1'
- com.android.build.api.attributes.BuildTypeAttr 'release'
- com.android.build.gradle.internal.attributes.VariantAttr 'release'
- org.gradle.category 'library'
- org.gradle.jvm.environment 'android'
- org.gradle.libraryelements 'jar'
- org.gradle.usage 'java-runtime'
- org.jetbrains.kotlin.platform.type 'androidJvm'
- Candidate transformation chains:
- Transformation chain: 'IdentityTransform' -> 'CopyTransform':
- 'IdentityTransform':
- Converts from attributes:
- artifactType 'android-classes-jar'
- To attributes:
- artifactType 'android-classes'
- 'CopyTransform':
- Converts from attributes:
- artifactType 'android-classes'
- To attributes:
- artifactType 'jar-for-dagger'
Vampire
08/21/2025, 7:52 AMritesh
08/21/2025, 7:54 AMritesh
08/21/2025, 7:55 AMVampire
08/21/2025, 8:41 AMIdentityTransform -> CopyTransform -> AggregatedPackagesTransform
and
UnzipTransform -> CopyTransform -> AggregatedPackagesTransform
IdentityTransform and CopyTransform are both identity transforms, just changing the attributes.
So actually the chains could also be
AggregatedPackagesTransform
and
UnzipTransform -> AggregatedPackagesTransform
directly which would solve the ambiguity.
And as a consumer-side work-around you can simply register those chains as shorter chain wins over longer chain.Vampire
08/21/2025, 8:44 AMCopyTransform -> AggregatedPackagesTransform
which skips the identity transform in the first chain I mentioned.
So actually it should also "fix" the issue even though the chain could be even shorter.ritesh
08/21/2025, 8:45 AMVampire
08/21/2025, 10:37 AM