Excluding beta\rc versions from dynamic dependencies


I am using dynamic dependencies (“com.google.guava:guava:+”) with dependency locking in my project.

What is the best way to prevent from dynamic dependencies to use versions that have “-beta” or “-rc” in their suffix?

I am using Gradle 6.7.1.


You should be able to add a component selection rule that rejects the versions you don’t want.