I have a library project - let's call it lib1
which has custom flavorDimensions
specified. More precisely there is buld
dimension with actual flavors full
and production
.
This library is used by another library project (lib2
) with no custom flavorDimensions
specified and app
project with dependency to lib2
but not directly to lib1
.
To tell lib2
which flavor of lib1
to use I can specify missingDimensionStrategy 'build', 'full'
. Great. Mission accomplished, right?
Well not really... Project won't sync because app
project doesn't know which flavor of lib1
should it use??? I need to put the missingDimensionStrategy 'build', 'full'
to the app project as well. You can imagine that if you try to build a well modularized app. This line will be practically in every build.gradle which transitively depends on lib1
.
Is this how it should be? Can't I tell gradle somewhere globally what flavor to use? I wanted to add the dependency with debugApi project (path:':xxx', configuration: 'fullDebug')
etc. but that doesn't work... :(
Can anybody give an advice? Thanks.