-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Circular dependency error when build includes itself #141
Comments
Thanks for the report. I can reproduce this without any substitution rules, with a simple: Can you explain the use case for adding the root build as an included build? This is inherently circular. |
This is mentioned here in the official gradle docs https://docs.gradle.org/current/userguide/composite_builds.html#included_build_declaring_substitutions |
@stiost Yes, I understand the use case for using The error is caused by the fact that the build is including itself, via |
Basically it allows you to use
instead of
Which in our huge composite build looks a lot better and you use the same syntax no matter which composite build project you're in. We need it for our shared convention plugins to work. |
@stiost if that's the goal, I'd recommend to use type-safe project accessors instead. |
@sschuberth That looks very cool and I'm definitely going to try it, I'm already using a dependency catalogue with type-safe accessors. But it doesn't seem to work with composite builds? |
I don't know. But you definitely need to opt-in to it first via |
@stiost Thanks for the explanation. My understanding:
The normal way to do this would be to use |
I get the following error when using this on a project that does dependency substitution:
Relevant snippet from settings.gradle (it works if I remove this block):
The text was updated successfully, but these errors were encountered: