Hi all.
So, here’s my configuration cut down to minimal example http://www.everfall.com/paste/id.php?9y2j7e1sg6ar
I expected the following to happen after running gradlew compileMetaDebugSources
or gradlew assembleMetaDebug
- .aar dependency with specific name should be picked up via
dependencies { MetaDebugSourcesCompile() }
from flatDir specified withinproductFlavors.meta.buildTypes.debug.repositories.flatDir
Instead of that,
- if an
.aar
required byFlavor2SourcesCompile
is not found when building other flavor, build breaks. Why? I don’t expect for all configurations to be analyzed and started, when a specific configuration is used. I don’t want any code involved with Flavor2 to participate in building of other flavotrs. - regardless of configuration used, all flatDir paths are examined when looking for .aar, which completely breaks my idea of having different dirs - now I have to explicitly state the variant in library name (
library-name-debug-0.0.1.aar
) instead of getting it picked automatically from separate flatDir path for each ProductFlavor.buildType (/libs/debug/library-name-0.0.1.aar
).
Come on, people. If I had a makefile with targets foo,bar,baz, with baz
defined as baz: foo
, I would definititely not expect bar
target to be executed by make baz
;
Why it’s different here?
I have four different .aar versions from external sources, they would not use MVN (neither do I want to do it), and I need to build four different versions of app based on flavor/build type. What can be done here?