Add flavor and build types fallback logic #31
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding flavors and build types fallback logic
using the project app module variants as the base for creating all bazel build targets of all modules.
fallback logics come to play when a dependency doesn't have a flavor or buildType or both that exist in the app module, in that case, fallbacks are used to select a substitute variant from existing variants in the dependency
for example in the following build graph
app -> B -> C
app - with flavors[f1,f2] buildTypes[ debug, release ]
B - android Lib buildTypes [ debug , release ]
C - kotlin / java lib
for module B bazel targets will be created for B according to the app module
bf1Debug // which is equal to original debug variants in B
bf2Debug // which is equal to original debug variants in B
bf1Release // which is equal to original Release variants in B
bf2Release // which is equal to original Release variants in B
the reason for this is to create the dependency graph in bazel for all app module variants.