Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve latest versions for Kotlin MPP projects #334

Closed
ZacSweers opened this issue Sep 2, 2019 · 57 comments
Closed

Unable to resolve latest versions for Kotlin MPP projects #334

ZacSweers opened this issue Sep 2, 2019 · 57 comments

Comments

@ZacSweers
Copy link

ZacSweers commented Sep 2, 2019

Failed to determine the latest version for the following dependencies (use --info for details):
 - com.squareup.okio:okio

Example repro project: https://github.com/zacsweers/catchup (run ./gradlew dependencyUpdates -Drevision=release)

These projects use https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html. Square has three popular libraries using this structure now: https://github.com/square/okio, https://github.com/square/wire, https://github.com/square/sqldelight

@ben-manes
Copy link
Owner

Please do a little debugging before requesting help, e.g. looking at the info log. We are using Gradle’s apis so there is no magic on our side. Remember that you are asking us to spend our free time, so important to be respectful of that.

@ZacSweers
Copy link
Author

Hey - sorry for that. I was filing this as a general issue ticket to begin tracking it as it's probably just something that isn't implemented yet due to the different packaging structure of Gradle's new metadata packaging structure (which I already narrowed down and pointed out in the issue). This way anyone could subscribe and get updates regardless of who works on it, or at least see it as a known issue.

If you really don't want folks filing issues without root-causing the issue's nitty gritty themselves first, maybe consider adding a CONTRIBUTING.MD or GitHub issue template that informs would-be submitters of expectation.

@ben-manes
Copy link
Owner

This is a duplicate of #326, as the error is:

Failed to resolve :libraries:flowbinding:releaseCompileClasspath
org.gradle.api.artifacts.UnknownConfigurationException: Configuration with name 'releaseCompileClasspathCopy' not found.

The full stacktrace indicates that this is a bug on the Android side because they fail to consider detached configurations, like our use of Configuration#copy, when applying constraint restrictions. As mentioned there, someone who is impacted by this should open a bug with them to resolve. Specifically look at:

com.android.build.gradle.internal.dependency.ConstraintHandler.execute(ConstraintHandler.kt:51)

@ZacSweers
Copy link
Author

I saw that issue and don't think this is the same. I'm filing about the - com.squareup.okio:okio dependency, which isn't used in the subproject you mentioned in your comment. Okio is an external dependency, and not a custom configuration on the android plugin module. You would see that dependency error on a non-android project as well, and would see the other MPP examples mentioned if they were added as dependencies in any of these projects as well.

@ben-manes
Copy link
Owner

If the dependency in a minimal project then it resolves fine. So you might need to reduce down to the smallest possible example, e.g. an MPP project with only this dependency, to narrow down the interactions. It may be a cascading error, another plugin applying a resolution strategy, etc. that is interacting unexpectedly.

plugins {
  id 'java'
  id 'com.github.ben-manes.versions' version '0.24.0'
}

repositories {
  mavenCentral()
}

dependencies {
  compile 'com.squareup.okio:okio:2.3.0'
}
------------------------------------------------------------
: Project Dependency Updates (report to plain text file)
------------------------------------------------------------

The following dependencies are using the latest milestone version:
 - com.github.ben-manes.versions:com.github.ben-manes.versions.gradle.plugin:0.24.0

The following dependencies have later milestone versions:
 - com.squareup.okio:okio [2.3.0 -> 2.4.0]
     https://github.com/square/okio/

Gradle release-candidate updates:
 - Gradle: [5.6.1: UP-TO-DATE]

@ZacSweers
Copy link
Author

Interesting. If I have time I can try to provide a more minimal repro, but in the meantime the linked repro above is the best that I can offer.

@ben-manes
Copy link
Owner

It seems we only print out the UnresolvedDependency problem's message, rather than capturing the full stacktrace, assuming that this is reported somewhere else in the log to reference. A local hack indicates that your problematic interaction is,

Failed to determine the latest version for the following dependencies (use --info for details):
 - com.squareup.okio:okio
The exception that is the cause of unresolved state: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.squareup.okio:okio:+.
Required by:
    project :app
Caused by: org.gradle.internal.component.AmbiguousConfigurationSelectionException: Cannot choose between the following variants of com.squareup.okio:okio:2.4.0:
  - jvm-api
  - jvm-runtime
  - metadata-api
All of them match the consumer attributes:
  - Variant 'jvm-api' capability com.squareup.okio:okio:2.4.0:
      - Unmatched attributes:
          - Found org.gradle.libraryelements 'jar' but wasn't required.
          - Found org.gradle.status 'release' but wasn't required.
          - Found org.gradle.usage 'java-api' but wasn't required.
          - Found org.jetbrains.kotlin.platform.type 'jvm' but wasn't required.
  - Variant 'jvm-runtime' capability com.squareup.okio:okio:2.4.0:
      - Unmatched attributes:
          - Found org.gradle.libraryelements 'jar' but wasn't required.
          - Found org.gradle.status 'release' but wasn't required.
          - Found org.gradle.usage 'java-runtime' but wasn't required.
          - Found org.jetbrains.kotlin.platform.type 'jvm' but wasn't required.
  - Variant 'metadata-api' capability com.squareup.okio:okio:2.4.0:
      - Unmatched attributes:
          - Found org.gradle.status 'release' but wasn't required.
          - Found org.gradle.usage 'kotlin-api' but wasn't required.
          - Found org.jetbrains.kotlin.platform.type 'common' but wasn't required.
        at org.gradle.internal.component.model.AttributeConfigurationSelector.selectConfigurationUsingAttributeMatching(AttributeConfigurationSelector.java:90)
        at org.gradle.internal.component.model.LocalComponentDependencyMetadata.selectConfigurations(LocalComponentDependencyMetadata.java:140)
        at org.gradle.internal.component.local.model.DslOriginDependencyMetadataWrapper.selectConfigurations(DslOriginDependencyMetadataWrapper.java:62)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.EdgeState.calculateTargetConfigurations(EdgeState.java:245)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.EdgeState.attachToTargetConfigurations(EdgeState.java:150)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.attachToTargetRevisionsSerially(DependencyGraphBuilder.java:343)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.resolveEdges(DependencyGraphBuilder.java:242)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:181)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:142)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDependencyResolver.java:123)
        at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolveGraph(DefaultConfigurationResolver.java:175)
        at org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolveGraph(ShortCircuitEmptyConfigurationResolver.java:86)
        at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolveGraph(ErrorHandlingConfigurationResolver.java:74)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$7.run(DefaultConfiguration.java:612)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:603)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$600(DefaultConfiguration.java:139)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$6.run(DefaultConfiguration.java:583)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$SafeExclusiveLockImpl.withLock(DefaultProjectStateRegistry.java:245)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveExclusively(DefaultConfiguration.java:579)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$500(DefaultConfiguration.java:139)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$5.run(DefaultConfiguration.java:570)
        at org.gradle.internal.Factories$1.create(Factories.java:26)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry.withLenientState(DefaultProjectStateRegistry.java:133)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry.withLenientState(DefaultProjectStateRegistry.java:125)
        at org.gradle.api.internal.artifacts.transform.DomainObjectProjectStateHandler.withLenientState(DomainObjectProjectStateHandler.java:59)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveToStateOrLater(DefaultConfiguration.java:567)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:556)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor724.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104)
        at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:59)
        at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.getProperty(BeanDynamicObject.java:228)
        at org.gradle.internal.metaobject.BeanDynamicObject.tryGetProperty(BeanDynamicObject.java:171)
        at org.gradle.internal.metaobject.CompositeDynamicObject.tryGetProperty(CompositeDynamicObject.java:55)
        at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:59)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getProperty(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:298)
        at com.github.benmanes.gradle.versions.updates.Resolver.resolve(Resolver.groovy:80)
        at com.github.benmanes.gradle.versions.updates.Resolver$resolve.call(Unknown Source)
        at com.github.benmanes.gradle.versions.updates.DependencyUpdates.resolve(DependencyUpdates.groovy:77)
        at sun.reflect.GeneratedMethodAccessor1655.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:352)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:184)
        at com.github.benmanes.gradle.versions.updates.DependencyUpdates$_resolveProjects_closure6$_closure10.doCall(DependencyUpdates.groovy:70)
        at sun.reflect.GeneratedMethodAccessor1654.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at groovy.lang.Closure.call(Closure.java:411)
        at groovy.lang.Closure.call(Closure.java:427)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3540)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3525)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3625)
        at org.codehaus.groovy.runtime.dgm$87.invoke(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:246)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
        at com.github.benmanes.gradle.versions.updates.DependencyUpdates$_resolveProjects_closure6.doCall(DependencyUpdates.groovy:69)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at groovy.lang.Closure.call(Closure.java:411)
        at groovy.lang.Closure.call(Closure.java:427)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3540)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3525)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3625)
        at org.codehaus.groovy.runtime.dgm$87.invoke(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:246)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
        at com.github.benmanes.gradle.versions.updates.DependencyUpdates.resolveProjects(DependencyUpdates.groovy:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
        at com.github.benmanes.gradle.versions.updates.DependencyUpdates.run(DependencyUpdates.groovy:54)
        at com.github.benmanes.gradle.versions.updates.DependencyUpdates$run.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119)
        at com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask.dependencyUpdates(DependencyUpdatesTask.groovy:81)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:49)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:42)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:717)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:684)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$5.run(ExecuteActionsTaskExecuter.java:476)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:461)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:444)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:93)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:237)
        at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33)
        at java.util.Optional.orElseGet(Optional.java:267)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
        at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:58)
        at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:33)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:39)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
        at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
        at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45)
        at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31)
        at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:208)
        at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70)
        at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
        at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43)
        at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89)
        at java.util.Optional.map(Optional.java:215)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:90)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:69)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:47)
        at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:140)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
        at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
        at org.gradle.api.internal.tasks.execution.StartSnapshotTaskInputsBuildOperationTaskExecuter.execute(StartSnapshotTaskInputsBuildOperationTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.lang.Thread.run(Thread.java:748)

@ZacSweers
Copy link
Author

Interesting, that is nearly identical to a similar issue that kotlin's annotation processing plugin (kapt) runs into as well on MPP dependencies. Perhaps they're both hitting the same gradle APIs and both failing the same way as a result?

https://youtrack.jetbrains.com/issue/KT-31641

@ben-manes
Copy link
Owner

Perhaps. You'd have to ping them as to why. It may be that they associate some consumer attributes to known configurations, which are not copied by Configuration.copyRecursive(). It is some incorrect assumption on their part, and perhaps an oversight on Gradle's, which is causing this failure to occur.

@serebit
Copy link

serebit commented Sep 5, 2019

I'm seeing a similar problem. Versions are found for all JVM-only dependencies, but any dependencies that don't include a JVM jar (like kotlinx-coroutines-core-native) report that the latest version could not be found. Despite this, the latest version number is shown below the dependency identifier. Here's an example from one of my projects:

Failed to determine the latest version for the following dependencies (use --info for details):
 - com.serebit.logkat:logkat
     0.4.7
 - com.soywiz.korlibs.klock:klock
     1.6.2
 - io.ktor:ktor-client-core-native
     1.2.4
 - org.jetbrains.kotlinx:kotlinx-coroutines-core-native
     1.3.1
 - org.jetbrains.kotlinx:kotlinx-serialization-runtime-native
     0.12.0

@ZacSweers
Copy link
Author

I believe this is something to do with artifacts using Gradle's new metadata API. Filing an issue on gradle won't really go anywhere for this either, because this is breaking trying to call an internal resolvedConfiguration API (they've rejected issues in the past for touching the same API).

I think the correct solution would be for this project to not use that internal API.

@ben-manes
Copy link
Owner

resolvedConfiguration is a publicly supported API, under org.gradle.api.artifacts. The internal apis are marked explicitly, e.g. org.gradle.api.internal. While there are usages of internal APIs in this plugin, they are not related to this issue (usages include: version comparator, project url lookup, and enriched resolution rules). Not using resolvedConfiguration is akin to replacing Gradle's dependency resolution with our own custom implementation.

@ZacSweers
Copy link
Author

Sorry, I was going by the stacktrace. I think I have found an original issue on the gradle side for this though after some digging, and supports the idea that it's related to metadata packaging: gradle/gradle#6389.

@ben-manes
Copy link
Owner

Nice find! That does look to be the problem.

@ljacomet
Copy link

ljacomet commented Sep 16, 2019

As commented in gradle/gradle#6389, the issues are on a similar topic but here it looks like a consumer problem and not a producer one.

In a comment above (too long to quote), what stands out is that there are effectively 0 consumer attributes on the dependency being resolved. The extract indicates the faulty project, app, but not the configuration itself.

Anyway, without requested attributes and with multiple candidate variants, disambiguation rules should be triggered.

Gradle has a default rule for JVM projects which should prefer java-runtime.
Kotlin plugins define their own rule which should also pick java-runtime when nothing is requested.
Unfortunately, there is another Kotlin added attribute, org.jetbrains.kotlin.platform.type, which also has a disambiguation rule. But that one prefers common when no value is requested.
This means that between java-runtime and common as disambiguated values, there is no matching variant.

Doing a bit of debugging in the test project, I notice that there are multiple attempts to resolve configurations like debugImplementationCopy but these have effectively no attributes.

I am not familiar with the internals of this plugin, but clearly configurations like debugImplementation are not made to be resolved independently.

@ben-manes
Copy link
Owner

Thanks @ljacomet. Are there any properties we should check to ignore certain configurations, if that is the intent?

This plugin iterates over configurations, modifies a copy to use + version, resolves, and aggregates the result into a report. We don’t have any awareness of what the configuration is for and defer all of the resolution work to Gradle.

@ljacomet
Copy link

ljacomet commented Sep 16, 2019

Ideally recent plugins should flag configurations according to their role using the canBeResolved and canBeConsumed properties. However if you were to resolve a configuration that says canBeResolved = false it would fail.

And indeed, this plugin changes all configuration to be canBeResolved = true - done following #127.

So for example in the context of the java plugin, you should never resolve compileOnly, runtimeOnly, implementation but instead compileClasspath and runtimeClasspath. There will still be a minor issue with legacy configurations like compile and runtime which ideally should not be resolved (and will warn about it in upcoming Gradle 6.0).

From looking at the plugin documentation, I do not see a place where the specific configuration resolved matters in the output report. But I do not know the plugin well enough to be confident.

So maybe that state change on copied configurations can be removed while preserving functionality.

@jmfayard
Copy link
Collaborator

jmfayard commented Oct 4, 2019

Hello, I'm note sure: what are the next steps that should be done to make progress on this issues, and by whom?

@jmfayard
Copy link
Collaborator

jmfayard commented Oct 7, 2019

I can reproduce the problem from @serebit
At this commit, the gradle-versions-plugin can not find the update for kotlinx-coroutines-core - should be 1.3.2 but it says 1.3.0

Splitties/refreshVersions@011574f

@jmfayard
Copy link
Collaborator

jmfayard commented Oct 9, 2019

I think I have nice reproducing steps

Given this build.gradle.kts

plugins {
    java
    kotlin("jvm") version "1.3.50"
}

val (coroutinesVersion, canbeResolved) = Pair("+", true)
configurations.named("implementation").get().isCanBeResolved = canbeResolved

dependencies {
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")

    implementation(kotlin("stdlib-jdk8"))
    testCompile("junit", "junit", "4.12")
}

Then I run ./gradlew dependencies --configuration implementation

With val (coroutinesVersion, canbeResolved) = Pair("+", false), I get

implementation - Implementation only dependencies for compilation 'main' (target  (jvm)). (n)
+--- org.jetbrains.kotlinx:kotlinx-coroutines-core:+ (n)
\--- org.jetbrains.kotlin:kotlin-stdlib-jdk8 (n)

(n) - Not resolved (configuration is not meant to be resolved)

With val (coroutinesVersion, canbeResolved) = Pair("+", true), I get

implementation - Implementation only dependencies for compilation 'main' (target  (jvm)).
+--- org.jetbrains.kotlinx:kotlinx-coroutines-core:+ -> 1.3.2
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
|    |    \--- org.jetbrains:annotations:13.0
|    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
\--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50
     +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 (*)
     \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50
          \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 (*)

@kassim
Copy link

kassim commented Oct 14, 2019

I had the same issue with okio and the solution was to downgrade the Kotlin version from '1.3.50' to '1.3.41'.

@jmfayard
Copy link
Collaborator

See Splitties/refreshVersions#117 for a possible solution

@rgoldberg
Copy link

I opened #358. I assume that is related to this issue. It is, however, for a Kotlin JVM-only (non-MPP) project.

@ben-manes
Copy link
Owner

Yes, they seem to be the same. We'll need to try @ljacomet suggestion of removing canBeResolved override for Gradle 6+ users to instead skip those configurations. Hopefully that resolves things, now that 6.0 has deprecated them so it should be safer to drop that hack. I haven't tried it yet, but am hopeful.

@madmikeross
Copy link

Any progress? I'm also observing the same issue for an Kotlin-JVM only (non-MPP) project when trying using okhttp in concert with cucumber.

The relevant bits of my build.gradle.kts:

val cucumberRuntime by configurations.creating {
    extendsFrom(configurations["testImplementation"])
}

dependencies {
    ...
    testImplementation("io.cucumber:cucumber-java8:4.7.4")
    testImplementation("io.cucumber:cucumber-junit:4.7.4")
    testImplementation("com.squareup.okhttp3:okhttp:4.3.1")
    kapt("com.google.dagger:dagger-compiler:2.25.2")
    ktlint("com.pinterest:ktlint:0.35.0")
}

tasks.withType<KotlinCompile> {
    kotlinOptions {
        freeCompilerArgs = listOf("-Xjsr305=strict")
        jvmTarget = "11"
    }
}

task("cucumber") {
    dependsOn("assemble", "compileTestJava")
    doLast {
        javaexec {
            main = "cucumber.api.cli.Main"
            classpath = cucumberRuntime + sourceSets.main.get().output + sourceSets.test.get().output
            args = listOf("--plugin", "pretty", "--glue", "alpha.cucumber", "src/test/resources")
        }
    }
}

For completeness, the error:

Execution failed for task ':cucumber'.
> Could not resolve all files for configuration ':cucumberRuntime'.
   > Could not resolve com.squareup.okio:okio:2.4.1.
     Required by:
         project : > com.squareup.okhttp3:okhttp:4.3.1
      > Cannot choose between the following variants of com.squareup.okio:okio:2.4.1:
          - jvm-api
          - jvm-runtime
          - metadata-api
        All of them match the consumer attributes:
          - Variant 'jvm-api' capability com.squareup.okio:okio:2.4.1:
              - Unmatched attributes:
                  - Found org.gradle.libraryelements 'jar' but wasn't required.
                  - Found org.gradle.status 'release' but wasn't required.
                  - Found org.gradle.usage 'java-api' but wasn't required.
                  - Found org.jetbrains.kotlin.platform.type 'jvm' but wasn't required.
          - Variant 'jvm-runtime' capability com.squareup.okio:okio:2.4.1:
              - Unmatched attributes:
                  - Found org.gradle.libraryelements 'jar' but wasn't required.
                  - Found org.gradle.status 'release' but wasn't required.
                  - Found org.gradle.usage 'java-runtime' but wasn't required.
                  - Found org.jetbrains.kotlin.platform.type 'jvm' but wasn't required.
          - Variant 'metadata-api' capability com.squareup.okio:okio:2.4.1:
              - Unmatched attributes:
                  - Found org.gradle.status 'release' but wasn't required.
                  - Found org.gradle.usage 'kotlin-api' but wasn't required.
                  - Found org.jetbrains.kotlin.platform.type 'common' but wasn't required.

I have tried:

  • adding kapt.incremental.apt=false to gradle.properties
  • removing kapt entirely
  • moving cucumber and okhttp to testRuntimeOnly so as to minimize any covariance with other dependencies

@ben-manes
Copy link
Owner

I have a fix in #421 which resolves the issue in @ZacSweers' project. For other users, I didn't see public repositories to test against. For confirmation, can you please try out this build against your project or, if public, let me know the repository to test against? I believe @Vampire @mike-ross-88 had projects showing this problem.

@ben-manes
Copy link
Owner

Since its benign we'll just release and you guys can reopen if still a problem

@sschuberth
Copy link
Collaborator

Thanks @ben-manes for trying to fix this. However, even with version 0.31.0 running on https://github.com/oss-review-toolkit/ort/tree/upgrade-versions-plugin I'm getting:

Failed to determine the latest version for the following dependencies (use --info for details):
 - com.github.ajalt.clikt:clikt

where clikt is a Kotlin MPP. Running with --info additionally provides:

Failed to determine the latest version for the following dependencies (use --info for details):
 - com.github.ajalt.clikt:clikt
The exception that is the cause of unresolved state: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find any matches for com.github.ajalt.clikt:clikt:+ as no versions of com.github.ajalt.clikt:clikt are available.
Searched in the following locations:
  - https://jcenter.bintray.com/com/github/ajalt/clikt/clikt/maven-metadata.xml
Required by:
    project :helper-cli

@sschuberth
Copy link
Collaborator

Also, something else seems to be wrong now: For testing I've downgraded okhttp from 4.8.1 to 4.8.0, but okhttp is not shown at all anymore, neither as up-to-date nor as outdated.

@ben-manes
Copy link
Owner

I did look at ort and I think there are multiple issues at play and I didn't have a good answer for yours.

In your case the unresolved configurations were due to an exception due to the Kotlin plugin trying to modify the graph at runtime, via KotlinDependenciesManagementKt.chooseAndAddStdlibDependency which Gradle rejects via preventIllegalMutation and throws,

Caused by: org.gradle.api.InvalidUserDataException: Cannot change dependencies of dependency configuration ':spdx-utils:api' after it has been included in dependency resolution.

I suspect this is because Kotlin assumes the dependency graph is created during the configuration phase, whereas our task runs during the execution phase. When we resolve our copy, kotlin perhaps too broadly tries to modify Gradle and some errors occur. I'm not really sure how we can solve that, as it is Kotlin trying to modify the guts of Gradle, us trying to use the public APIs, and Gradle changing the implementation on every release. At this low-level it kind of feels like duct tape keeping things mostly working, and I don't know if there's anything we can fix or if its on Kotlin's plate.

Also, something else seems to be wrong now: For testing I've downgraded okhttp from 4.8.1 to 4.8.0, but okhttp is not shown at all anymore, neither as up-to-date nor as outdated.

I had hoped this bug fix would be benign, but if not then we can rollback if you can isolate the problem.

@ben-manes
Copy link
Owner

In regards to com.github.ajalt.clikt:clikt, this is because we don't handle non-jar dependencies yet. This dependency is metadata only, so an extension is applied during resolution. When we create our dependency query, we are not applying the classifier and extension. This causes a failure because Gradle is looking for a jar and fails.

I did find where to extract this information in #224 but never got around to adding it into the query. It's probably very simple if you'd like to give it a shot. It should just take a little formatting magic in the query string.

@ben-manes
Copy link
Owner

@sschuberth Okhttp is not showing up because of the configuration issue, per your comment in oss-review-toolkit/ort#2527. So it doesn't show up because we can't resolve that configuration, due to the Kotlin plugin

org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':utils:implementationCopy'. at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.wrapException(ErrorHandlingConfigurationResolver.java:104) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolveGraph(ErrorHandlingConfigurationResolver.java:76) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$1.run(DefaultConfiguration.java:620) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387) at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:611) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.lambda$resolveExclusively$4(DefaultConfiguration.java:591) at org.gradle.api.internal.project.DefaultProjectStateRegistry$SafeExclusiveLockImpl.withLock(DefaultProjectStateRegistry.java:289) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveExclusively(DefaultConfiguration.java:589) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.lambda$resolveToStateOrLater$3(DefaultConfiguration.java:571) at org.gradle.internal.Factories$1.create(Factories.java:26) at org.gradle.api.internal.project.DefaultProjectStateRegistry.withLenientState(DefaultProjectStateRegistry.java:134) at org.gradle.api.internal.project.DefaultProjectStateRegistry.withLenientState(DefaultProjectStateRegistry.java:126) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withLenientState(DefaultProjectStateRegistry.java:231) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveToStateOrLater(DefaultConfiguration.java:571) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:548) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source) at com.github.benmanes.gradle.versions.updates.Resolver.getCurrentCoordinates(Resolver.groovy:226) at com.github.benmanes.gradle.versions.updates.Resolver.resolve(Resolver.groovy:75) at com.github.benmanes.gradle.versions.updates.DependencyUpdates.resolve(DependencyUpdates.groovy:85) at com.github.benmanes.gradle.versions.updates.DependencyUpdates.access$0(DependencyUpdates.groovy) at com.github.benmanes.gradle.versions.updates.DependencyUpdates$_resolveProjects_closure6$_closure10.doCall(DependencyUpdates.groovy:75) at jdk.internal.reflect.GeneratedMethodAccessor445.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041) at groovy.lang.Closure.call(Closure.java:405) at groovy.lang.Closure.call(Closure.java:421) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3574) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3559) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3659) at com.github.benmanes.gradle.versions.updates.DependencyUpdates$_resolveProjects_closure6.doCall(DependencyUpdates.groovy:70) at com.github.benmanes.gradle.versions.updates.DependencyUpdates$_resolveProjects_closure6.call(DependencyUpdates.groovy) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3574) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3559) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3659) at com.github.benmanes.gradle.versions.updates.DependencyUpdates.resolveProjects(DependencyUpdates.groovy:67) at com.github.benmanes.gradle.versions.updates.DependencyUpdates.run(DependencyUpdates.groovy:55) at com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask.dependencyUpdates(DependencyUpdatesTask.groovy:100) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.run(ExecuteActionsTaskExecuter.java:570) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387) at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:555) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:538) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:109) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:279) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:268) at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33) at java.base/java.util.Optional.orElseGet(Optional.java:362) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:67) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:36) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34) at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43) at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73) at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54) at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34) at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38) at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49) at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:159) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:72) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:43) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24) at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92) at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85) at java.base/java.util.Optional.map(Optional.java:258) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78) at java.base/java.util.Optional.orElseGet(Optional.java:362) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28) at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:195) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:187) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114) at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52) at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:409) at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:399) at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:94) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) at java.base/java.lang.Thread.run(Thread.java:832) Caused by: org.gradle.api.InvalidUserDataException: Cannot change dependencies of dependency configuration ':spdx-utils:api' after it has been included in dependency resolution. at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.preventIllegalMutation(DefaultConfiguration.java:1152) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.validateMutation(DefaultConfiguration.java:1112) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.lambda$validateMutationType$1(DefaultConfiguration.java:294) at org.gradle.internal.ImmutableActionSet$SingletonSet.execute(ImmutableActionSet.java:225) at org.gradle.api.internal.DefaultDomainObjectSet.assertMutableCollectionContents(DefaultDomainObjectSet.java:71) at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:252) at org.gradle.api.internal.DelegatingDomainObjectSet.add(DelegatingDomainObjectSet.java:110) at org.gradle.api.internal.artifacts.DefaultDependencySet.add(DefaultDependencySet.java:68) at org.gradle.api.internal.artifacts.DefaultDependencySet.add(DefaultDependencySet.java:36) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt.chooseAndAddStdlibDependency(KotlinDependenciesManagement.kt:136) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt.access$chooseAndAddStdlibDependency(KotlinDependenciesManagement.kt:1) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt$configureStdlibDefaultDependency$$inlined$with$lambda$1$1.invoke(KotlinDependenciesManagement.kt:79) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt$configureStdlibDefaultDependency$$inlined$with$lambda$1$1.invoke(KotlinDependenciesManagement.kt) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt$sam$org_gradle_api_Action$0.execute(KotlinDependenciesManagement.kt) at org.gradle.internal.ImmutableActionSet$SetWithFewActions.execute(ImmutableActionSet.java:285) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.runDependencyActions(DefaultConfiguration.java:455) at org.gradle.internal.component.local.model.DefaultLocalComponentMetadata$DefaultLocalConfigurationMetadata.realizeDependencies(DefaultLocalComponentMetadata.java:526) at org.gradle.internal.component.local.model.DefaultLocalComponentMetadata$DefaultLocalConfigurationMetadata.addDefinedExcludes(DefaultLocalComponentMetadata.java:479) at org.gradle.internal.component.local.model.DefaultLocalComponentMetadata$DefaultLocalConfigurationMetadata.getExcludes(DefaultLocalComponentMetadata.java:470) at org.gradle.internal.component.model.DefaultSelectedByVariantMatchingConfigurationMetadata.getExcludes(DefaultSelectedByVariantMatchingConfigurationMetadata.java:73) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.NodeState.computeNodeExclusions(NodeState.java:663) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.NodeState.computeModuleResolutionFilter(NodeState.java:653) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.NodeState.visitOutgoingDependencies(NodeState.java:249) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:183) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:145) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDependencyResolver.java:133) at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolveGraph(DefaultConfigurationResolver.java:174) at org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolveGraph(ShortCircuitEmptyConfigurationResolver.java:85) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolveGraph(ErrorHandlingConfigurationResolver.java:74) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$1.run(DefaultConfiguration.java:620) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387) at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:611) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.lambda$resolveExclusively$4(DefaultConfiguration.java:591) at org.gradle.api.internal.project.DefaultProjectStateRegistry$SafeExclusiveLockImpl.withLock(DefaultProjectStateRegistry.java:289) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveExclusively(DefaultConfiguration.java:589) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.lambda$resolveToStateOrLater$3(DefaultConfiguration.java:571) at org.gradle.internal.Factories$1.create(Factories.java:26) at org.gradle.api.internal.project.DefaultProjectStateRegistry.withLenientState(DefaultProjectStateRegistry.java:134) at org.gradle.api.internal.project.DefaultProjectStateRegistry.withLenientState(DefaultProjectStateRegistry.java:126) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withLenientState(DefaultProjectStateRegistry.java:231) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveToStateOrLater(DefaultConfiguration.java:571) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:548) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source) at com.github.benmanes.gradle.versions.updates.Resolver.getCurrentCoordinates(Resolver.groovy:226) at com.github.benmanes.gradle.versions.updates.Resolver.resolve(Resolver.groovy:75) at com.github.benmanes.gradle.versions.updates.DependencyUpdates.resolve(DependencyUpdates.groovy:85) at com.github.benmanes.gradle.versions.updates.DependencyUpdates.access$0(DependencyUpdates.groovy) at com.github.benmanes.gradle.versions.updates.DependencyUpdates$_resolveProjects_closure6$_closure10.doCall(DependencyUpdates.groovy:75) at jdk.internal.reflect.GeneratedMethodAccessor445.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041) at groovy.lang.Closure.call(Closure.java:405) at groovy.lang.Closure.call(Closure.java:421) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3574) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3559) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3659) at com.github.benmanes.gradle.versions.updates.DependencyUpdates$_resolveProjects_closure6.doCall(DependencyUpdates.groovy:70) at com.github.benmanes.gradle.versions.updates.DependencyUpdates$_resolveProjects_closure6.call(DependencyUpdates.groovy) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3574) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3559) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3659) at com.github.benmanes.gradle.versions.updates.DependencyUpdates.resolveProjects(DependencyUpdates.groovy:67) at com.github.benmanes.gradle.versions.updates.DependencyUpdates.run(DependencyUpdates.groovy:55) at com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask.dependencyUpdates(DependencyUpdatesTask.groovy:100) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.run(ExecuteActionsTaskExecuter.java:570) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387) at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:555) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:538) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:109) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:279) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:268) at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33) at java.base/java.util.Optional.orElseGet(Optional.java:362) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:67) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:36) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34) at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43) at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73) at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54) at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34) at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38) at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49) at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:159) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:72) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:43) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24) at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92) at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85) at java.base/java.util.Optional.map(Optional.java:258) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78) at java.base/java.util.Optional.orElseGet(Optional.java:362) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28) at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:195) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:187) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114) at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52) at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:409) at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:399) at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:94) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) at java.base/java.lang.Thread.run(Thread.java:832)

@sschuberth
Copy link
Collaborator

Also, something else seems to be wrong now: For testing I've downgraded okhttp from 4.8.1 to 4.8.0, but okhttp is not shown at all anymore, neither as up-to-date nor as outdated.

I had hoped this bug fix would be benign, but if not then we can rollback if you can isolate the problem.

Odd, when I tried again against versions 0.29.0, 0.30.0 and 0.31.0, it worked with all of them. Probably just a mistake on my side, I'm maybe not awake yet 😉

@ben-manes
Copy link
Owner

@sschuberth Looking at the kotlin plugin, it checks in the allDependencies if inherited,

https://github.com/JetBrains/kotlin/blob/07aee8831eb45690053028f39f3312e1c8e90f69/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/KotlinDependenciesManagement.kt#L131-L136

It appears that if I change our resolution logic from clearing them as,

Configuration copy = configuration.copyRecursive().setTransitive(false)
// https://github.com/ben-manes/gradle-versions-plugin/issues/127
if (copy.metaClass.respondsTo(copy, "setCanBeResolved", Boolean)) {
copy.setCanBeResolved(true)
}
copy.dependencies.clear()
copy.dependencies.addAll(latest)

to retaining those inherited as,

def all = new ArrayList(configuration.getAllDependencies())
all.removeAll(configuration.dependencies)

copy.dependencies.clear()
copy.dependencies.addAll(all)
copy.dependencies.addAll(latest)

Then the failure messages to resolve those configurations goes away,

> Task :dependencyUpdates
Failed to resolve :cli:implementation
Failed to resolve :model:implementation
Failed to resolve :utils:implementation

So we can try applying this fix and the extension one. Please open new issues if interested, as the patches should be fairly simple.

@sschuberth
Copy link
Collaborator

Please open new issues if interested, as the patches should be fairly simple.

Thanks for the investigation, I've split out the two work items as separate issues.

@ben-manes
Copy link
Owner

Thanks! Its past midnight my time, so I'll look into cleaning up the code snippets and making the changes sometime this week.

@Vampire
Copy link
Contributor

Vampire commented Sep 8, 2020

I cannot test right now, I have limited computer and internet access until next month. But my project is public now. You can try with https://github.com/Vampire/setup-wsl.
Here you can remove the work-around: https://github.com/Vampire/setup-wsl/blob/master/buildSrc/src/main/kotlin/net/kautler/versions.gradle.kts#L91

@ben-manes
Copy link
Owner

Unfortunately I didn't see a difference. Since the error is a module version and this is a JS artifact, it seems likely that #424 will solve this for you.

The exception that is the cause of unresolved state: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve org.jetbrains.kotlinx:kotlinx-nodejs:+.
Required by:
    project :
Caused by: org.gradle.internal.component.AmbiguousConfigurationSelectionException: Cannot choose between the following variants of org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7:
  - jsIr-api
  - jsIr-runtime
  - jsLegacy-api
  - jsLegacy-jsLegacyCommonFakeApiElements
  - jsLegacy-runtime
All of them match the consumer attributes:
  - Variant 'jsIr-api' capability org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7:
      - Unmatched attributes:
          - Provides org.gradle.status 'release' but the consumer didn't ask for it
          - Provides org.gradle.usage 'kotlin-api' but the consumer didn't ask for it
          - Provides org.jetbrains.kotlin.js.compiler 'ir' but the consumer didn't ask for it
          - Provides org.jetbrains.kotlin.platform.type 'js' but the consumer didn't ask for it
  - Variant 'jsIr-runtime' capability org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7:
...

@Vampire
Copy link
Contributor

Vampire commented Sep 8, 2020

It is not a JS artifact. It is a regular jar. In the end it is translated to JS, but the dependency itself is a jar.

@ben-manes
Copy link
Owner

@Vampire When investigating this and @serebit's issue, I believe it is due to needing the dependency capabilities copied over. That dependency has a platform capability to select from (e.g. JVM, JS). I would need a sample project to test against. The api implies that we could provide the source's getRequestedCapabilities() via the target's capabilities​(configureAction).

I would need a minimal failing test build that I can verify a fix against, and a new issue should be opened with those details.

@ben-manes
Copy link
Owner

I tried your setup-wsl and all of those metadata fields were empty (capabilities, attributes, exclusion rules, etc). However I think it is coming from the configuration's attributes, but I have problems getting it to run against a maven local install of the plugin.

@Vampire
Copy link
Contributor

Vampire commented Sep 13, 2020

I think what you need is in buildSrc/build.gradle line 56 add mavenLocal() to the repositories and in line 63 add your snapshot version as additional implementation dependency. Alternatively add your plugin as included build to buildSrc/settings.gradle.

@ben-manes
Copy link
Owner

I released and tried that version, but no luck. I can’t figure out what metadata it’s expecting for us to copy over, unfortunately

@Vampire
Copy link
Contributor

Vampire commented Sep 13, 2020

😢

@sschuberth
Copy link
Collaborator

Odd, I'm now checking with oss-review-toolkit/ort@2bfba27 again, and ./gradlew dependencyUpdates shows

The following dependencies are using the latest milestone version:
 - com.squareup.okhttp3:okhttp:4.8.1

although OkHttp has version 4.9.0 by now.

@ben-manes
Copy link
Owner

This is because you use force in your resolution strategy for all configurations (see #265 for workarounds)

@ben-manes
Copy link
Owner

@Vampire The variant metadata issue in your project is solved #438. Hopefully we're now fully MPP compatible.

@Vampire
Copy link
Contributor

Vampire commented Nov 27, 2020

Thx, works much better now for those :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests