I currently have a Gradle project where, at its root, it contains a number of included builds:
settings.gradle.kts
build.gradle.kts
foo/settings.gradle.kts
foo/build.gradle.kts
bar/settings.gradle.kts
bar/build.gradle.kts
Both the foo
and bar
projects share a convention plugin that sets the version in their respective builds, and of course they each have their group and artifact names. What I want to do is to publish both a Gradle platform and a Gradle version catalog that includes entries for both foo
and bar
, and publish all four together. From what I can tell, what I need to do is first make the catalog, then use it to create the platform. Is this correct?
In terms of making the catalog, it looks like the programmatic APIs take in strings; is there a way to get the group and artifact IDs from them as opposed to manually syncing them up? Additionally, the versioning plugin only sets the version in an afterEvaluate()
block; if we were to assume that all four artifacts are to be published together, is it even possible to supply the version into the version catalog API?