refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

Support refreshing versions for plugin jar artifacts

Open mr3y-the-programmer opened this issue 2 years ago • 2 comments

⚠️ Is your feature request related to a problem? Please describe

RefreshVersions doesn't fetch updates when declaring plugin coordinates like normal dependency artifacts to use in build scripts or composite builds (i.e convention plugins), For example:

android-gradlePlugin = "com.android.tools.build:gradle:8.1.2"
ktlint-gradlePlugin = "org.jlleitschuh.gradle:ktlint-gradle:11.6.1"

So, I have to remember to update those dependencies whenever I bump their respective plugin marker artifacts' versions

💡 Describe the solution you'd like

Running .\gradlew refreshVersions should fetch updates for those dependencies like any other dependencies

🤚 Do you want to develop this feature yourself?

  • [ ] Yes
  • [x] No

mr3y-the-programmer avatar Nov 04 '23 20:11 mr3y-the-programmer

I don't see what "plugin jar artifacts" is when I look at the snippet you provided.

However, if this is in Kotlin or Groovy DSL Gradle code, you should be able to use versionFor, though it could be a bit verbose in your case.

LouisCAD avatar Nov 08 '23 20:11 LouisCAD

maybe I wasn't clear enough. Those are defined in libs.versions.toml, they are gradle plugins but are declared the same way you declare normal dependencies (i.e "groupId:artifact:version"), I'm defining them this way to be able to use them as dependencies in convention plugins. similar to what now in android sample app does here

mr3y-the-programmer avatar Nov 08 '23 22:11 mr3y-the-programmer