gradle-versions-plugin icon indicating copy to clipboard operation
gradle-versions-plugin copied to clipboard

Failed to determine the latest version for the following dependencies - SOLVED

Open davidmoshal opened this issue 6 years ago • 2 comments

  • ran into this error when running dependencyUpdate from Intellij
  • this was with a project that had been working absolutely fine a few weeks earlier.
  • error occurred after Jetbrains Toolbox auto-updated IntelliJ to 2019.1.3-RC
  • turned out that Gradle's 'offline work' setting was selected by default in that version
  • unselecting "offline work" solved the problem.

While not specific to this plugin, it would have helpful if the error message explained that the failure was due to this setting, if possible.

Thanks for the awesome plugin, couldn't live without it, use it on every kotlin/groovy/java project !

davidmoshal avatar May 24 '19 07:05 davidmoshal

I get this message for dependencies I have explicitly excluded with

selection.reject('Excluded')

I expected a message that at least included "Excluded"

Should I be using something other than reject()?

memelet avatar Oct 08 '19 00:10 memelet

selection.reject indicates that the candidate version is not accepted and Gradle will try the next version if available. Gradle doesn't view the resolution of a dependency as optional, so there is no exclusivity but rather is listed as a resolution failure. This is why you would see it in the report as an unresolvable dependency.

You can write a custom report, outputFormatter if you would like to display in some fashion. For example you could clear the dependency from the provided Result and then create a PlainTextReporter to print the report.

ben-manes avatar Oct 08 '19 00:10 ben-manes

If this is "SOLVED" as indicated in the title, can we close the issue?

sschuberth avatar Aug 24 '22 07:08 sschuberth