I have a multiproject :b rooted in directory B that I want to be able to build both on its own with settings in B.
I also want to be able to build the project in B as
b as part of larger multiproject :a in A by specifying settings on the command line.
I think I could have done this if only there was a way to add the root level
b in the former using settings in B, but it doesnāt seem to be possible to set another rootDir without moving settings to it, and then the first build would not work without specifying its settings too.
Any ideas?
Aggregating builds isnāt currently supported. Iād probably create another āsettings.gradleā which is a superset of the former, and live with the duplication, at least for now.
Agreed, the ādefaultā āsettings.gradleā under B would be a subset of the other ābigā āsettings.gradleā.
In order for the project in B to fit in both the ādefaultā and the ābigā builds, its path should be ā
bā in both cases, and for this to happen with the ādefaultā āsettings.gradleā in B, it must be able to set the root directory to something other than B.
Is that possible?
Are you talking about the logical of physical project hierarchy? When build B is used on its own, its root project will always have logical project path ā":"ā (not ā":b"ā). When B is a part of A, Bās root project will have logical project path ā":b"ā (not ā"
b"ā).