Add Gradle platform dependency
Apache 2.0Add a gradle platform dependency to a build.gradle file in the correct configuration based on where it is used.
org. openrewrite. gradle. AddPlatformDependencyRequired
The first part of a dependency coordinate 'com.google.guava:guava:VERSION'.
The second part of a dependency coordinate 'com.google.guava:guava:VERSION'
Optional
An exact version number or node-style semver selector used to select the version number. You can also use latest.release for the latest available version and latest.patch if the current version is a valid semantic version. For more details, you can look at the documentation page of version selectors.
Allows version selection to be extended beyond the original Node Semver semantics. So for example, Setting 'version' to "25-29" can be paired with a metadata pattern of "-jre" to select Guava 29.0-jre
A configuration to use when it is not what can be inferred from usage. Most of the time this will be left empty, but is used when adding a new, as yet unused, dependency.
Used to determine whether the platform dependency should be enforcedPlatform.
mod run . --recipe= org. openrewrite. gradle. AddPlatformDependency \
-P groupId= com. google. guava \
-P artifactId= guavaInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.