This message was deleted.
# community-support
s
This message was deleted.
t
it's an open source plugin. I suppose some motivated person could PR a fix.
f
Lockflles can actually do it all out of the box. The only thing missing is support for updates of plugins.
v
It seems like it is going to stop working in gradle 8.0 due to gradle changes
It started with "will stop working in 5.0", so who knows. :-D And I guess latest when it really stops working some community member will eventually come up with a PR hopefully. There actually is an alternative, but I don't like it. https://jmfayard.github.io/refreshVersions/ I don't like it mainly for two reasons. 1. It does not natively support version catalogs, it requires to use version
_
in the version catalog and have the actual version in its proprietary file. 2. Yes, it is much faster than Bens plugin, but for the price of limited support. It does not support all repositories as it does not use the Gradle mechanisms. It looks up versions in Maven repositories itself, which makes is much faster, but in my opinion prone to wrong results and missing updates from other repository types.
t
Fwiw, version catalogs support are coming: https://github.com/jmfayard/refreshVersions/pull/509 I, for one, just go through my plugins and dependencies (all centralized in a version catalog) and manually check for updates on plugins.gradle.org and search.maven.org (and depending on the dependency –following semver or not– and the version jump, I then go check the release notes). It also helps detect which dependencies never or rarely have new versions, which might mean they've become unmaintained.
v
Ah, good to know, thanks. Still leaves the other concern though. 🙂 I like Bens way because I don't care if a seldomly executed task needs a bit more time, but gets more reliable results.
👍 2
1
b
Yes, some motivated person could update the plugin, but it’s at least somewhat actively maintained by the creator, he just doesn’t consider himself a gradle expert (and let’s be honest best practices are constantly shifting). forcing something this fundamental to be community-maintained feature, which by definition means needing to constantly react to underlying gradle changes, seems actively anti-developer-productivity to me. I guess we’ll see what happens when it finally truly breaks.
v
Well, Ben said in one of the comments that the necessary changes are that substantial, that the maintenance team does not have the time to do it, as it is not that actively maintained.
forcing something this fundamental to be community-maintained feature
Actually I'm not really sure whether this is "that fundamental". For each update you should anyway read the release notes and breaking changes and so on. So it is pretty debatable whether this is something fundamental or not. But Gradle is also alwas open to PRs. I guess if someone would contribute this functionality to Gradle itself, there might be a chance it also makes it into the Gradle sources and then is maintained by Gradle themselves. But people continue to create new plugins for this purpose instead of contributing the feature to Gradle, so the opinion that it is that fundamental that it should be part of the core Gradle seems not to be strong enough. 🙂
1
f
The ability to upgrade dependencies is fundamental and most modern dependency management tools have this built-in (e.g. yarn, npm, cargo, composer), and all of them do it via lock files. Gradle does too, it's just not advertised and people don't know about it, plus, it's only implemented for half of the dependencies a Gradle build has. 😛
Copy code
dependencies {
    implementation("group:artifact:+")
    implementation("group:artifact:1.+")
    // etc.
}
Copy code
gradle dependencies --write-locks                    # updates all dependencies
gradle dependencies --update-locks $group:$artifact  # upgrades the GA (with wildcard support)
No idea how this could be used for plugins. 🤷
There are many gotchas in the above. Dependency locking is not fully thought through yet. Or, half implemented. But, the basis is there. 🙂
v
I know the feature, I just don't like it 😄