Update Rules

This section is responsible for controlling how Bazel Steward selects a version to update.

update-rules:
  -
    kinds: maven
    dependencies: commons-io:commons-io
    versioning: loose
    bumping: minimal
    pin: "2.0."
  -
    dependencies: io.get-coursier:interface
    versioning: semver
    bumping: latest
  -
    dependencies: org.jetbrains.kotlinx:kotlinx-coroutines-jdk8
    versioning: regex:^(?<major>\d*)(?:[.-](?<minor>(\d*)))?(?:[.-]?(?<patch>(\d*)))?(?:[-.]?(?<preRelease>(\d*)))(?<buildMetaData>)?
  -
    dependencies:
      - org.jetbrains.kotlinx:*
    enabled: false
  -
    versioning: loose

Available fields:

  • versioning (string)
    Overrides what kind of versioning schema is used for the dependency. Schema determines how to parse the version in order to understand which part of the string is “major”, “minor”, “patch” etc. Default: loose. Allowed values:
    • semver - parse version strictly following Semantic Versioning schema
    • loose - less constrained regex that will try to catch most popular versioning strategies that do not strictly conform to semver (but it works correctly with semver versions too)
    • regex:... - use custom regex for parsing the version. Useful for libraries with very non-standard schema.
  • pin (string)
    Filters versions that are allowed for the dependency. It can be an exact version, prefix or regular expression. Bazel Steward will try to automatically determine what kind of input it is. You can override this by prepending the value with prefix:, exact: or regex:.
  • bumping (string)
    Sets the strategy for bumping this dependency.
    1. latest - Always bump to the highest version.
    2. minimal - First bump to the latest patch, then to the latest minor, and then finally to the latest major.
    3. minor-patch-major - First bump to the latest minor, if there is no such update, bump the latest patch otherwise bump the major.
    4. latest-by-date - Always bump to the most recently released version even if the version is lower than currently used.
    5. patch-only - Bump only patch versions, never upgrade by major or minor version.
    6. patch-minor - First bump to the latest patch, then to the latest minor. Do not bump major.
    7. minor-patch - First bump to the latest minor version, if not possible try bumping the patch version. Never bump major.
  • enabled (boolean)
    If set to false, Bazel Steward will ignore this dependency for available versions lookup and any updates. If this is set for kinds only filter, then it will disable the specified kind - Bazel Steward will not attempt to extract any versions used in your repository under this kind.