Open miikeat opened 4 years ago
It's complicated and would certainly require work on Renovate bot's end. I'll keep this open, but this is low priority as I'm focused on version 1.0 (and on vacation).
If someone wants to work on this from the Renoavte Bot side, I can provide information on how that would work
I'd be curious what's needed for this to work! Maybe I'll find the time and could do the Renovate part...
I had a look at what Renovate Bot here https://github.com/galacticcouncil/substrate-api-explorer/issues/114 and here https://github.com/mulesoft/mule-migration-assistant/pull/406
It seems to me that it should be quite easy for the bot to
versions.properties
exist$ ./gradle refershVersions
versions.properties
. That's the whole point of it by the way, this file is machine readable and writable.
Given a versions.properties
like this:
it could then reformat it in the issue like this:
- [ ] update version.kotlinx.coroutines to 1.3.7 from 1.3.1
And in the pull request it would just do
## versions.properties
- version.kotlinx.coroutines=1.3.1
+ version.kotlinx.coroutines=1.3.7
Now ideally you would have a CI setup so that you run the unit tests for example to checck whether you have a compability problem with the new version.
(The only question would be how you filter the multiple options to just one)
Discover thanks to Twitter how renovabot currently works https://github.com/renovatebot/renovate/blob/d858d85205cc99d7ecf617754612d2a17ff4eda0/lib/manager/gradle/gradle-updates-report.ts#L42
AFAIK the approach here would be to add gradle-refreshVersions
"manager" (like gradle and gradle-wrapper )
I came here to file this bug upon seeing https://github.com/renovatebot/renovate/pull/16684/files which adds support for kts files. Does this still seem feasible?
@yschimke Kotlin scripts support in dependabot isn't related to refreshVersions.
Are you using refreshVersion already?
If yes there is no need to use dependabot. I use a little GitHub Actions that runs or demand or according to a crontab, which runs refreshVerisons, commit and open a pull request. I can share it if you need it.
@jmfayard , I believe the PR was just a sample integration.
If yes there is no need to use dependabot
I'm afraid, that is the other way around. Dependabot / Renovate helps to make it easier to weigh and test different dependencies. Dependabot/renovate generate human-readable PRs, they list changelog, etc, etc.
So it would make total sense to add something like PR 16684 above, except it should consume and update versions.properties
.
If somoeone wants to work on dependabot for that, I'm totally fine.
It seems like they are doing manual parsing? That's a bit sad. They would never fully support Gradle this way, it's turing complete.
If they use Gradle there is nothing special they need to do query the list of dependencies and versions managed by refreshVersions.
And for updating versions.properties
we can trivially add a task ./gradlew refreshVersionsUpdateVersion --dependency "it.krzeminski:github-actions-kotlin-dsl" --version "0.22.0"
Yep, wasn't linking to that PR as a solution, more as a recent example showing they take contributions, and the complexity of this sort of support.
As I said, the complexity depend on whether they do manual parsing or can call Gradle. If the later it should be pretty easy, for the former I wouldn't want to work on it personally.
I do not think parsing versions.properties
is harder than calling Gradle though.
With manual parsing, dependabot can't know that the key version.kotest
is meant for io.kotest:kotest-.*:*
nit: Is dependabot a generic term? I thought it and renovate were different products? Hopefully the solution could be adapted for both.
With manual parsing, dependabot can't know that the key version.kotest is meant for io.kotest:kotest-.:
Oh, I missed aliases.
Also FYI @yschimke they don't support versions catalogs https://github.com/dependabot/dependabot-core/issues/3121
OK.
Heres a renovate PR for it https://github.com/square/okhttp/pull/7386
Ah the issue is resolved then. Then it works with refreshVersions too, we don't do anything special.
nit: Is dependabot a generic term? I thought it and renovate were different products? Hopefully the solution could be adapted for both.
definitely not a generic term @yschimke. Dependabot and Renovate are two competitors (Dependabot doesn't indeed support version catalog Gradle feature).
also, did you link to the wrong PR in your last comment? I don't understand the relation with the current discussion (this is just an example of a Renovate PR) and I don't understand why @jmfayard comes to the conclusion the issue is resolved 🤔
Yep, I confused everyone with a PR showing support for kts. Sorry for confusing this message.
I came here to file this bug upon seeing https://github.com/renovatebot/renovate/pull/16684/files which adds support for kts files.
The previous links to examples were from 2020, so thought a fresh sample of an integration could help.
I'll leave now...
Renovate Bot is only supporting updating version numbers in
gradle.properties
. Probably it also doesn't understand the "_
"-placeholder.Is there a way to get Renovate Bot working while still using your Plugin with all it's advantages? I would love to have the feature of automatic PR creation for Dependency Updates but as we are using Bitbucket the number of possible applications to do this is quite low :(