Force the use of a specific version via version catalog instead of resolutionstrategy

Hi,

I force the use of a specific version of a couple libraries like this:

configurations {
    configureEach {
        resolutionStrategy {
            force 'com.abc:efg:1.2.3'   // this is a transitive dependency
            force 'org.klm:xyz:8.9'   // this is a normal dependency
}
}
}

However, I use a version catalog to define my dependencies so I wondered whether defining the dependencies in the version catalog with a strict version like below will achieve the same thing therefore no need for the resolutionstrategy declaration?

abc = { group = "com.abc", name = "efg", version = { strictly = "1.2.3" } }
klm = { group = "org.klm", name = "xyz", version = { strictly = "8.9" } }

This highly depends on the situation.
resolutionStrategy.force is a very big hammer that can even override other strict version declarations, and is not properly represented in things like dependency reports.
If you had a valid reason to use force, using a strict version might not be sufficient.
If you used force wrongly and could have used a strict version for the normal dependency and a strict constraint for the transitive dependency to start with, then you can also use a strict version in the version catalog.