Resolving circular included builds

Suppose in my Gradle project I have two included builds, A and B. In A/settings.gradle.kts I have


and likewise I have in B/settings.gradle.kts I have


Of course, this would obviously cause things to fail to build, but there are likely use cases where you might see this happen (for example, if A was a convention plugin that sets a project’s version, and B was a convention plugin that configures publishing settings).

What’s the best way to resolve such circular inclusions?