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

Plugin suggests older version #789

Open
ghatasheh opened this issue Jun 20, 2023 · 5 comments
Open

Plugin suggests older version #789

ghatasheh opened this issue Jun 20, 2023 · 5 comments

Comments

@ghatasheh
Copy link

ghatasheh commented Jun 20, 2023

Hey, while testing the plugin I found an odd behaviour related to version parsing.

The plugin suggested the following change;

From version 1.10.1 --> 1.2.0
androidx-core-ktx = "androidx.core:core-ktx:1.2.0"

However, 1.10.1 is the most recent version.

Could you please take a look? thanks

@ghatasheh ghatasheh reopened this Jun 20, 2023
@ben-manes
Copy link
Owner

Can you provide a minimal example build? When I try, I get a correct result:

The following dependencies have later milestone versions:
 - androidx.core:core-ktx [1.10.1 -> 1.12.0-alpha05]
     https://developer.android.com/jetpack/androidx/releases/core#1.12.0-alpha05

@sembozdemir
Copy link

Hi @ben-manes, I have a similar issue. 1.12.0 is already released but the plugin always says the latest version should be 1.9.0.
https://developer.android.com/jetpack/androidx/releases/core#1.12.0

The following dependencies exceed the version found at the milestone revision level:
 - androidx.core:core [1.10.1 <- 1.9.0]
     https://developer.android.com/jetpack/androidx/releases/core#1.10.1
 - androidx.core:core-ktx [1.10.1 <- 1.9.0]
     https://developer.android.com/jetpack/androidx/releases/core#1.10.1

here is the configuration for dependencyUpdates task.

tasks.named("dependencyUpdates").configure {
  def isNonStable = { String version ->
    def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { keyword -> version.toUpperCase().contains(keyword) }
    def regex = /^[0-9,.v-]+(-r)?$/
    return !stableKeyword && !(version ==~ regex)
  }

  rejectVersionIf {
    isNonStable(it.candidate.version) && !isNonStable(it.currentVersion)
  }
}

I have removed the configuration and get the same result.

the plugin version I use is 0.47.0

@ben-manes
Copy link
Owner

can you provide a minimal project that reproduces the problem? As shown above, I wasn't able to reproduce it in a plain java project. However, #798 showed that the Android plugin did something very strange by forcing a resolution constraint. If that's the case then I don't know what they are doing and it would most likely be a bug in their plugin.

@extmkv
Copy link

extmkv commented Sep 14, 2023

Also facing the same problem with multiple libraries.
Screenshot 2023-09-14 at 10 35 02
Screenshot 2023-09-14 at 10 29 08

@ben-manes
Copy link
Owner

sounds like #798 since you're showing Android with okhttp. If you don't apply the android plugin then it resolves, which means their plugin is doing something incorrect to break Gradle (like an overly broad resolution strategy that restricts version queries). If you confirm it works with the java plugin and fails using the android plugin like #798, then you will need to open an issue with the Google folks. There is nothing we can easily do to work around that.

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

4 participants