In my current App I have 2 builds, lets call them build 1 and build 2. I understand that two flavours can share common code/resources but can also have separate code and resources such as the following:

What i am trying to do is expand build 2 so that it shares some code with another build (e.g build 3). Either sharing some code such as the following:

This would be build2 and build 3 sharing some code/resources while also having the ability to have their own unique code sets. Or:

Here, build 3 is extending build 2 so that all code and resources from build 2 are available in both builds but build 3 can also have its own unique code/resources.
I think that extending build 2 is the best way (if it is possible) but any advice or pointing me in the right direction would be much appreciated. I have spent over 6 hours scouring the internet with no avail.