When running the current test suite against Gradle 7.6-20221021231540+0000, several tests fail with:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dependencies'.
> Could not resolve all dependencies for configuration ':jenkinsServerRuntimeOnly'.
> There was an error while evaluating a component metadata rule for org.jenkins-ci.main:jenkins-war:2.222.3.
> Could not get unknown property 'originalMetadata' for org.jenkins-ci.main:jenkins-core:2.222.3 of type org.gradle.api.internal.artifacts.repositories.resolver.DirectDependencyMetadataAdapter.
...
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'originalMetadata' for org.jenkins-ci.main:jenkins-core:2.222.3 of type org.gradle.api.internal.artifacts.repositories.resolver.DirectDependencyMetadataAdapter.
| at org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:85)
| at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:62)
| at org.gradle.api.internal.artifacts.repositories.resolver.DirectDependencyMetadataAdapter_Decorated.getProperty(Unknown Source)
| at org.jenkinsci.gradle.plugins.jpi.JpiVariantRule$_execute_closure1$_closure7$_closure8.doCall(JpiVariantRule.groovy:54)
One possible way to fix this is to use the public API #getArtifactSelectors() first introduced in Gradle 6.3. This raises the minimum Gradle version, but also allows us to move this class to java. With Gradle 8 due out soon, this seems like a reasonable trade-off.
When running the current test suite against Gradle
7.6-20221021231540+0000
, several tests fail with:One possible way to fix this is to use the public API
#getArtifactSelectors()
first introduced in Gradle 6.3. This raises the minimum Gradle version, but also allows us to move this class to java. With Gradle 8 due out soon, this seems like a reasonable trade-off.Credit to @rpalcolea for first reporting this.