Hi , During gradle publish, getting below error: G...
# gradle
s
Hi , During gradle publish, getting below error: Getting this after Upgraded kotlin to 1.8.20 and AGP to 7.4.2 ,Gradle version - 7.5 ,Android Studio Flamingo, Java - 11.
Copy code
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
    jvmTarget = JavaVersion.VERSION_1_8.toString()
}
Error during extraction: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration 'mkopenmeasurementdebugUnitTestCompileClasspath'. at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.wrapException(ErrorHandlingConfigurationResolver.java:107) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver$ErrorHandlingResolvedConfiguration.getResolvedArtifacts(ErrorHandlingConfigurationResolver.java:343) at org.jfrog.gradle.plugin.artifactory.extractor.GradleModuleExtractor.calculateDependencies(GradleModuleExtractor.java:132) at org.jfrog.gradle.plugin.artifactory.extractor.GradleModuleExtractor.extractModule(GradleModuleExtractor.java:99) at org.jfrog.gradle.plugin.artifactory.task.ExtractModuleTask.extractModuleFile(ExtractModuleTask.java:31) ......... Caused by: org.gradle.internal.component.AmbiguousVariantSelectionException: The consumer was configured to find an API of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.4.2', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'. However we cannot choose between the following variants of project mkopenmeasurement - Configuration 'mkopenmeasurementdebugApiElements' variant android-aidl declares an API of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.4.2', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm': - Unmatched attributes: - Provides attribute 'artifactType' with value 'android-aidl' 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 a library but the consumer didn't ask for it - Configuration 'mkopenmeasurementdebugApiElements' variant android-lint-local-aar declares an API of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.4.2', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm': - Unmatched attributes: - Provides attribute 'artifactType' with value 'android-lint-local-aar' 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 a library but the consumer didn't ask for it
v
s
All my versions are upgraded in my project.
v
So?
That issue is still "Open", and it contains suggestions on how to resolve the issue, like for example using the standard
maven-publish
plugin instead of the proprietary JFrog plugin.
s
okay. thank you. I thought that was fixed in 4.* release.
Hi @Vampire, my project is already using maven-publish and I still get this error. is it okay to ignore this error as the publish was successful?
v
I guess you should not apply the JFrog plugin anymore if you don't use it anymore. Maybe the error goes away then? I have no idea, never used that plugin, and this is not a support Slack for all Gradle plugins in the world, I just Googled your error for you. 😉
s
oh, okay. thank you