Using catalog *and* platform

P.S. My other post (Sharing information between Settings and Project via Plugin ) relates to this. Specifically, we need to be able to pass a version for jakarta.persistence-api at the command line to be able to scriptably test against new JPA versions. But I have not found a good solution to sharing such details between Settings and Project. Is the only option to extract that command line arg twice?

How do you extract that command line arg?
I’d just use a Gradle property, you can set its default value in gradle.properties and overwrite it using -P. Then as mentioned in the other thread, you can simply access the Gradle property from both, the settings script and the build script easily without effort.

P.S.S. I ask this because the user guide does not mention they can be used together and even has a longish discussion about when to use which, largely implying that you should pick one or the other.

Read that longish discussion until it finishes and you see that what you say is the opposite of the truth. :slight_smile:
To quote the user guide:

In practice, your project can both use a catalog and declare a platform which itself uses the catalog:

Example 336. Using a catalog within a platform definition

plugins {
   `java-platform`
}

dependencies {
   constraints {
       api(libs.mylib)
   }
}

So yes, I’d say it should work properly.
And if you want all or almost all entries of the catalog in the platform, you can even iterate over the entries and add them automatically without duplication.

Maybe you can provide an MCVE where it does not behave like you expect?