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

Latest version of org.jetbrains.kotlin dependencies are not being found #824

Closed
xenomachina opened this issue Jan 19, 2024 · 2 comments
Closed

Comments

@xenomachina
Copy link

With gradle.properties:

kotlin_version = 1.8.22

and build.gradle:

plugins {
    id 'com.github.ben-manes.versions' version '0.50.0'
    id 'java-gradle-plugin'
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

And Gradle wrapper 8.1.1 or 8.5, running ./gradlew dependencyUpdates incorrectly reports that the org.jetbrains.kotlin dependencies are up to date, despite the fact that there are newer versions of these dependencies:

The following dependencies are using the latest milestone version:
 - org.jetbrains.kotlin:kotlin-compiler-embeddable:1.8.22
 - org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.8.22

It looks like this bug was introduced in 0.47.0, as downgrading gradle-versions-plugin to 0.46.0 fixes this problem. With that version, ./gradlew dependencyUpdates correctly reports:

The following dependencies have later milestone versions:
 - com.github.ben-manes.versions:com.github.ben-manes.versions.gradle.plugin [0.46.0 -> 0.50.0]
 - org.jetbrains.kotlin:kotlin-stdlib [1.8.22 -> 2.0.0-Beta3]
     https://kotlinlang.org/

In this discussion, @ben-manes indicated that this may be related to #768.

cc: @tresat @jvandort

@ben-manes
Copy link
Owner

I confirmed that reverting #768 resolves your problem.

  1. Set local jdk to 11 (jenv local 11.0)
  2. git revert 852c610360ae47494e8da41a120aead37bb06a9b
  3. Incremented VERSION_NAME in gradle.properties
  4. Published locally (publishToMavenLocal)
  5. Ran your sample with the local plugin by adding mavenLocal() as a plugin repository
build.gradle
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'java-gradle-plugin'

buildscript {
  repositories {
    // Use 'gradle install' to install latest
    mavenLocal()
    gradlePluginPortal()
  }

  dependencies {
    classpath 'com.github.ben-manes:gradle-versions-plugin:0.50.1'
  }
}

repositories {
  mavenCentral()
}

dependencies {
  implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.22"
  implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22"
}
console report
groovy git:(master) ✗ gradle dU
executing gradlew instead of gradle

> Task :dependencyUpdates

------------------------------------------------------------
: 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.50.1

The following dependencies have later milestone versions:
 - org.jetbrains.kotlin:kotlin-gradle-plugin [1.8.22 -> 2.0.0-Beta3]
     https://kotlinlang.org/
 - org.jetbrains.kotlin:kotlin-stdlib [1.8.22 -> 2.0.0-Beta3]
     https://kotlinlang.org/

Gradle release-candidate updates:
 - Gradle: [8.0.2 -> 8.5 -> 8.6-rc-2]

ben-manes pushed a commit that referenced this issue Jan 22, 2024
This will handle the case of detecting Kotlin plugins properly.
Fixes #823 / #824
@ben-manes
Copy link
Owner

Released, thanks @tresat!

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