Splitties / refreshVersions

Life is too short to google for dependencies and versions
https://splitties.github.io/refreshVersions/
MIT License
1.65k stars 107 forks source link

Support refreshing versions for plugin jar artifacts #709

Open mr3y-the-programmer opened 11 months ago

mr3y-the-programmer commented 11 months ago

⚠️ 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?

LouisCAD commented 10 months ago

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.

mr3y-the-programmer commented 10 months ago

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