Shared Subprojects in Multiproject Builds

I was wondering if it is bad practice to have two multi-project builds share some subprojects?

I know a better way would be to have the subprojects publish an artifact that can be consumed, but given the complexity of our build we’re not there yet. I would think Gradle wouldn’t have a problem with it and would run which ever build was called, but I think I might run into issues if both multiproject builds were imported into an IDE.

Anyone have any thoughts or experience with something similar?

Don’t ever ever ever ever even consider that. Ever!
One project should never be part of more than one build.
You can combine builds using composite builds without the need to actually publish.
That is most probably what you are actually after: Composing builds

1 Like