Unbounded strictly rich version vs require rich version

Hi,

I was cleaning up some build.gradle files that had an unbounded rich version, e.g.

  api('org.bouncycastle:bcprov-jdk15on') { version { strictly '[1.64,)' } }

From my understanding, this is telling Gradle that we want to use any version higher than or equal to 1.64. From my build scans, Gradle uses the 1.7 version, which is ok.

But I figured that this is essentially mimicking what a require rich version would do.
So I replaced the line above by the following:

api('org.bouncycastle:bcprov-jdk15on') { version { require '1.64' } }

Again, from my understanding this is telling Gradle that we want to use any version higher than or equal to 1.64. However, from my build scans, Gradle uses 1.64 now instead of 1.7 like it did for an unbounded strictly.

Is this because require is essentially implemented as an unbounded strictly with a prefer for the given version? Is it bad practice to have an unbounded strictly in Gradle?

Thanks

require can also be a range, so you can also have require [1.64,).
In that case I guess the same version should be selected, though I didn’t try.
The difference to the strictly then is, that it can be downgraded by a strict version.
If you used strictly and another strict version disagrees, you get a failure instead.