ben-manes / gradle-versions-plugin

Gradle plugin to discover dependency updates
Apache License 2.0
3.82k stars 199 forks source link

Using configureAll instead of all causes dependencyUpdates to fail silently #801

Closed jimshowalter closed 11 months ago

jimshowalter commented 11 months ago

We tried to change this:

dependencyUpdates.resolutionStrategy { componentSelection { all {

to this:

dependencyUpdates.resolutionStrategy { componentSelection { configureEach {

because IntelliJ said to do that.

But with the change, dependencyUpdates doesn't output any updates, even when there are updates.

ben-manes commented 11 months ago

you can use -i to see if an exception was logged. We pass your lambda into configuration.resolutionStrategy so it's all Gradle's code instead of ours at that point.

ben-manes commented 11 months ago

fwiw, I don't see configureEach in the Javadoc for componentSelection.

jimshowalter commented 11 months ago

Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method configureEach() for arguments [dependency_1m5034kjkgp6cdvjn4xjpdx3l$_run_closure4$_closure9$_closure10@31837593] on object of type com.github.benmanes.gradle.versions.updates.resolutionstrategy.ResolutionStrategyWithCurrent.

ben-manes commented 11 months ago

yep, sounds like you got bamboozled!