mikepenz/AboutLibraries

Warning logs after updating to version 10.9.1

andrebcmarinho opened this issue · 3 comments

After updating from v10.9.0 to v10.9.1 or any other more recent version I am seeing a lot of warning logs like this:

[18:17:14]: ▸ Found ambiguous variant - android_apps:lib-domain:1.0.1-SNAPSHOT;brandBetaApiElements
[18:17:14]: ▸ org.gradle.internal.component.AmbiguousArtifactVariantsException: The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'beta', attribute 'com.android.build.api.attributes.ProductFlavor:app' with value 'brand', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'. However we cannot choose between the following variants of project :lib-domain:
[18:17:14]: ▸ - Configuration ':lib-domain:brandBetaApiElements' variant android-classes-jar declares a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'beta', attribute 'com.android.build.api.attributes.ProductFlavor:app' with value 'brand', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
[18:17:14]: ▸ - Unmatched attributes:
[18:17:14]: ▸ - Provides attribute 'app' with value 'brand' but the consumer didn't ask for it
(...)
[18:17:14]: ▸ - Incompatible because this component declares a component of category 'verification' and the consumer needed a library
[18:17:14]: ▸ at org.gradle.internal.component.ResolutionFailureHandler.ambiguousArtifactVariantsFailure(ResolutionFailureHandler.java:103)
[18:17:14]: ▸ at org.gradle.api.internal.artifacts.transform.AttributeMatchingArtifactVariantSelector.doSelect(AttributeMatchingArtifactVariantSelector.java:102)
[18:17:14]: ▸ at org.gradle.api.internal.artifacts.transform.AttributeMatchingArtifactVariantSelector.select(AttributeMatchingArtifactVariantSelector.java:79)
[18:17:14]: ▸ at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.VariantResolvingArtifactSet.select(VariantResolvingArtifactSet.java:98)
[18:17:14]: ▸ at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultVisitedArtifactResults.select(DefaultVisitedArtifactResults.java:55)
[18:17:14]: ▸ at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultVisitedArtifactResults.selectLenient(DefaultVisitedArtifactResults.java:74)
[18:17:14]: ▸ at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getSelectedArtifacts(DefaultLenientConfiguration.java:121)
[18:17:14]: ▸ at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getAllModuleDependencies(DefaultLenientConfiguration.java:200)
[18:17:14]: ▸ at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver$ErrorHandlingLenientConfiguration.getAllModuleDependencies(ErrorHandlingConfigurationResolver.java:147)
[18:17:14]: ▸ at com.mikepenz.aboutlibraries.plugin.util.DependencyCollector.collect(DependencyCollector.kt:80)
[18:17:14]: ▸ at com.mikepenz.aboutlibraries.plugin.AboutLibrariesCollectorTask.configure(AboutLibrariesCollectorTask.kt:35)
[18:17:14]: ▸ at com.mikepenz.aboutlibraries.plugin.AboutLibrariesCollectorTask.action(AboutLibrariesCollectorTask.kt:41)
[18:17:14]: ▸ at java.base@17.0.10/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

I know this is related with a change you did on fbd5b44

My question is if you have any hint on how to fix this or if it is possible to disable these warnings?

Thank you

At this time there is no way to disable these logs, however I'll have a look to remove the stacktrace from this error message and to only output that if debug is enabled to make it less noisy.

Generally these logs may be relevant, if it may fail to include this library if some variant is not compatible.

See the latest update for lowered noise by this log

@mikepenz thank you so much for taking a look 👍