Recently I’ve been looking into platforms and it seems to me they’re the same as version catalogs, the only difference from what I can tell is semantics.
They are not at all the same, though they are related. You can even use both together. But it is all detailed in the documentation at Sharing dependency versions between projects
@Vampire thanks for the elaboration here. i read the document - and still am not able to judge what in the case of junit should be chosen, what type do you recommend? using catalog and platform:
That is not the kind of “using platform” that is meant here.
You can make a project in your build that applies the java-platform plugin and there define constraints (also coming from a version catalog eventually) and then make your other projects depend on that platform to control the version.
In the context here, you do not use platform, but you mix up using a 3rd-party platform vs using strings vs using version catalog entries.