RahulGautamSingh 23272951d6 feat(manager/gradle): support rich version constraints in the Groovy/Kotlin DSL (#46498)
* refactor(manager/gradle): add helper for matching `group:artifact` strings

As part of follow-up changes, we'll extract dependencies whose version
is declared separately from their coordinates, so we need a way to
validate a bare `group:artifact` notation. `isDependencyString` can't
be used, as it requires a version to be present.

This isn't currently used.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>

* feat(manager/gradle): support rich version constraints in the Groovy/Kotlin DSL

As noted in discussion #45481, Renovate doesn't extract dependencies
whose version comes from a Gradle rich version constraint[0], so a
`strictly` pin never receives updates - not even for a security fix:

```groovy
dependencies {
    implementation('org.slf4j:slf4j-api') {
        version {
            strictly '[1.7, 1.8['
        }
    }
}
```

The version catalog extractor already handles rich versions, so the
missing piece is the `version { ... }` block in the Groovy and Kotlin
DSLs.

Renovate can only rewrite a single version literal per dependency, so
we pick one constraint to update and record which one in
`managerData.versionConstraint`:

- `strictly` -> bump `strictly`
- `strictly` (single version) + `prefer` -> bump `strictly`, as `prefer`
  is inert when there's nothing to choose between
- `require`, optionally with `prefer` -> bump `require`, as `prefer` is
  only a hint and may not be what gets resolved
- `prefer` alone -> bump `prefer`
- `require` + `strictly` -> skip as `multiple-constraint-dep`, as Gradle
  applies `require()` before `strictly()`, so bumping only `strictly`
  would leave the `require` literal behind as stale text
- `strictly` range + `prefer` -> skip as `multiple-constraint-dep`, as
  `prefer` has to keep pointing inside the range and we can't move both
- anything with `reject`/`rejectAll` -> skip as `unsupported-version`,
  matching what the version catalog extractor already does

As `strictly` and `prefer` pin a version on purpose, updating them by
default would be surprising, so those deps are extracted with
`enabled: false` - meaning they only receive updates for vulnerability
alerts, which force through. Users who want regular updates can opt in
with a package rule matching `managerData.versionConstraint`, similar to
how `manager/gomod` handles `depType: indirect`. A `require` constraint
means the same thing as a plain version declaration, so it is updated
like any other dependency.

This doesn't unify behaviour with version catalogs, which extract a
single `require`/`prefer`/`strictly` and update it without disabling it.
Aligning them would take away updates users get today, so that's left as
a separate decision.

The `!!` shorthand (i.e. `foo:bar:1.7.25!!`) is untouched - it already
extracts as an opaque version string. Rich versions declared in the
Groovy/Kotlin `versionCatalogs { }` builder, as opposed to TOML, are
still dropped silently.

[0]: https://docs.gradle.org/current/userguide/dependency_versions.html#sec:rich-version-constraints

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>

* fix(vulnerabilities): raise fixes for deps their manager disables by default

* test(workers/fetch): set packageName on disabled-dep fixtures

* test(manager/gradle): assert enabled is not set

---------

Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-10-05 13:24:06 +00:00
2017-01-15 17:23:34 +01:00
2022-02-04 20:29:47 +01:00
2024-03-14 13:48:17 +00:00
2026-05-09 07:13:04 +00:00

Mend Renovate CLI banner

License: AGPL-3.0-only codecov Renovate enabled Build status Docker Pulls OpenSSF Scorecard

What is the Mend Renovate CLI?

Renovate is an automated dependency update tool. It helps to update dependencies in your code without needing to do it manually. When Renovate runs on your repo, it looks for references to dependencies (both public and private) and, if there are newer versions available, Renovate can create pull requests to update your versions automatically.

Features

  • Delivers update PRs directly to your repo
    • Relevant package files are discovered automatically
    • Pull Requests automatically generated in your repo
  • Provides useful information to help you decide which updates to accept (age, adoption, pass rates, merge confidence)
  • Highly configurable and flexible to fit in with your needs and repository standards
  • Largest collection of languages and platforms (listed below)
  • Connects with private repositories and package registries

Languages

Renovate can provide updates for most popular languages, platforms, and registries including: npm, Java, Python, .NET, Scala, Ruby, Go, Docker and more. Supports over 90 different package managers.

Platforms

Renovate updates code repositories on the following platforms: GitHub, GitLab, Bitbucket, Azure DevOps, AWS Code Commit (experimental), Gitea, Forgejo, Gerrit (experimental), SCM-Manager (experimental)

Ways to run Renovate

The most effective way to run Renovate is to use an automated job scheduling system that regularly runs Renovate on all enabled repositories and responds with priority to user activity. Mend offers cloud-hosted and self-hosted solutions. See the options below.

Mend Renovate Community (Cloud-Hosted)

Supports: GitHub.com, Bitbucket Cloud

Hosted by Mend.io. No setup is needed. Community plan available (Free)

  • GitHub Cloud: Install the Renovate Cloud-Hosted App on your GitHub org, then select the repos to enable
  • Bitbucket Cloud: Add the Mend App to your Workspace, then add the Mend Renovate user to the projects you want to enable

Mend Renovate Community (Self-hosted)

Supports: GitHub, GitLab, Bitbucket Data Center

Install and run your own Renovate server. Access internal packages.

Other ways to run Renovate

If you can’t use a pre-built job scheduling system, or want to build your own, the following options are available:

Run Renovate on your Pipeline

Mend provides a GitHub Action or a GitLab Runner to help you run Renovate as a CI pipeline job.

Run Renovate CLI

There are several ways to run the Renovate CLI directly. See docs: Running Renovate for all options.

Supports: all platforms

For additional community-maintained options, see the Community Tools page.

Docs

More about Renovate

Renovate Docs

Comparisons

Get involved

Issues and Discussions

Please open a Discussion to get help, suggest a new feature, or to report a bug. We only want maintainers to open Issues.

Contributing

To contribute to Renovate, or run a local copy, please read the contributing guidelines.

Contact and Social Media

The Renovate project is proudly supported and actively maintained by Mend.io.

  • Contact Mend.io for commercial support questions.

Follow us on:

Security / Disclosure

If you find any bug with Renovate that may be a security problem, please report it through the GitHub Security Advisories process. This way we can evaluate the bug and hopefully fix it before it gets abused. Please give us enough time to investigate the bug before you report it anywhere else.

If you would like to discuss a potential finding before raising the Advisory, then e-mail us at: renovate-disclosure@mend.io.

S
Description
Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
Readme 343 MiB
Languages
TypeScript 98.5%
JavaScript 0.3%
HTML 0.2%
HCL 0.2%
Swift 0.2%
Other 0.2%