Skip to content

Replace Renovate with Dependabot#3232

Closed
simonbasle wants to merge 3 commits into
reactor:3.4.xfrom
simonbasle:replaceRenovateWithDependabot
Closed

Replace Renovate with Dependabot#3232
simonbasle wants to merge 3 commits into
reactor:3.4.xfrom
simonbasle:replaceRenovateWithDependabot

Conversation

@simonbasle
Copy link
Copy Markdown
Contributor

@simonbasle simonbasle commented Oct 13, 2022

This PR replaces Renovate with Dependabot.

Despite being less configurable, Dependabot can target a non-default branch.

One limitation is that Dependabot currently doesn't process version catalogs, even in the standard format of gradle/libs.versions.toml.
It should however be able to process version strings imported from a .gradle file as long as the filename contains dependencies` (see source).
So unfortunately this means rolling back version catalogs, at lest partially.

The version declarations broadly go into 4 categories:

  1. Reactor versions that we always edit during the release
  2. Versions that we want to more closely monitor, or freeze
  3. Plugins
  4. Other libraries

While (4) can and should be managed by Dependabot, the first three categories cannot or shouldn't.
In this PR I chose to keep (1/2/3) in the libs.versions.toml version catalog and split out versions from (4) into a new gradle/dependencies.gradle file to be imported.

That file would thus be understood, monitored and updated by Dependabot only, while we continue to make manual edits to gradle/libs.versions.toml (and root gradle.properties).

Drawbacks

The plugins won't be auto-updated anymore and will need manual monitoring and updates.

Alternatives

This is more a question of style but in the current state, we reintroduce the artifact coordinates in each build.gradle (eg. implementation "group:my-artifact:$myArtifactVersion").
I've found one blog post that uses a different style where the whole coordinates are defined inside the dependencies.gradle file in a dictionnary:

// in `gradle/dependecies.gradle`:
libs = { 
    myArtifact : "group:my-artifact:$myArtifactVersion"
}

// in individual `build.gradle` files
dependencies {
    implementation libs.myArtifact
}

See blog post.
This could be considered as a further improvement.

…adle

Actually remplace all relevant libs.versions with string + version
imported from dependencies.gradle
@simonbasle simonbasle changed the base branch from main to 3.4.x October 13, 2022 08:17
@kkocel
Copy link
Copy Markdown

kkocel commented Nov 17, 2022

One point to drawbacks - dependabot does not support Gradle wrapper updates

@chemicL
Copy link
Copy Markdown
Member

chemicL commented Mar 8, 2023

Superseded by #3377.

@chemicL chemicL closed this Mar 8, 2023
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

Successfully merging this pull request may close these issues.

3 participants