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

Cannot determine latest version for kotlin-stdlib on plugin version 0.32.0+ #443

Closed
davidburstromspotify opened this issue Nov 8, 2020 · 4 comments

Comments

@davidburstromspotify
Copy link

Using com.github.ben-manes.versions version 0.35.0 and Gradle 6.7:

Failed to determine the latest version for the following dependencies (use --info for details):
 - org.jetbrains.kotlin:kotlin-stdlib
     1.4.20-RC
The exception that is the cause of unresolved state: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.jetbrains.kotlin:kotlin-stdlib:.
Required by:
    project :project

This is a regression from 0.31.0, which correctly determines the latest milestone version.

The build script in question uses

dependencies {
  api(platform(project(":platform")))
  implementation(kotlin("stdlib"))
}

and the :platform module defines

dependencies {
  constraints {
    api(kotlin("stdlib"), "1.4.20-RC")
  }
}
@ben-manes
Copy link
Owner

Can you provide a sample project to debug from? We might need to broaden the stdlib workaround based on your project setup.

Kotlin is a bad citizen wrt how it hacks at Gradle to be incompatible with the standard APIs. This leads to us having to reverse engineer their ad hoc, hard coded behavior so that Gradle can resolve generically. I don't know why they are not following standard idioms and expect others to fix their messes, but it is frustrating.

@davidburstromspotify
Copy link
Author

I believe this project should reproduce the issue nicely: gradle-versions-plugin-issue-443.zip

@ben-manes
Copy link
Owner

It seems to have included a version that is null as the source dependency, causing a resolution failure. Filtering that out did the trick and not a problem for prior kotlin projects bug fixed against.

------------------------------------------------------------
: Project Dependency Updates (report to plain text file)
------------------------------------------------------------

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

The following dependencies have later milestone versions:
 - org.jetbrains.kotlin:kotlin-stdlib [1.4.10 -> 1.4.20-RC]
     https://kotlinlang.org/

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

@davidburstromspotify
Copy link
Author

Cool, thank you for resolving the issue so fast!

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

2 participants