I'm looking for something like
apply plugin: 'android-library'
dependencies {
flavor1Compile files('utility.aar')
}
Everything fails with:
Could not find method flavor1Compile() for arguments [file collection] on root project 'SampleProject'.
Libraries don't support flavors.
Note that this wouldn't work in a app project because you haven't defined the flavor first. You'd need to do
android {
productFlavors {
flavor1 {}
}
}
dependencies {
flavor1Compile ...
}
it wouldn't work in the other order as declaring the product flavor is what create its associated dependency configuration.