Skip to content

Failure to resolve the version of Java Agent in "BOM notation" #4

@neboskreb

Description

@neboskreb

The plugin fails to resolve the version of Java Agent in "BOM notation":

    testImplementation platform('org.mockito:mockito-bom:5.21.0')
    testImplementation 'org.mockito:mockito-core'
    testJavaagent      'org.mockito:mockito-core'

The sync succeeds but the attempt to run tests fails with the exception:

FAILURE: Build failed with an exception.
* What went wrong:
Configuration cache state could not be cached: field `val$javaagentConfiguration` of `io.github.neboskreb.javaagent.JavaForkOptionsConfigurer$1` bean found in field `jvmArgumentProviders` of `org.gradle.process.internal.DefaultJavaForkOptions_Decorated` bean found in field `forkOptions` of task `:android-app:testDebugUnitTest` of type `com.android.build.gradle.tasks.factory.AndroidUnitTest`: error writing value of type 'org.gradle.api.internal.provider.TransformBackedProvider'
> Could not resolve all files for configuration ':android-app:testJavaagent'.
   > Could not resolve org.mockito:mockito-core.
     Required by:
         project ':android-app'
      > Configuration with name 'testRuntimeClasspath' not found.

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions