i've got a build.gradle file setup with the following (i've obviously excluded parts that shouldn't matter for brevity):
android { defaultConfig { ndk { abiFilters 'armeabi', 'armeabi-v7a', 'x86' } }
productFlavors {
flavor1 { ... }
flavor2 { ... }
flavor3 { ... }
flavor4 { ... }
flavor5 { ... }
}
buildTypes {
debug {
externalNativeBuild { ndkBuild { cFlags '-DDEBUG' } }
...
}
release {
externalNativeBuild { ndkBuild { cFlags '-DRELEASE' } }
...
}
}
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
}
it works, but it compiles the native code for each flavor+buildType. so not only debug and release, but also flavor1Debug, flavor2Release, etc., which takes forever
how do i tell gradle to only do the externalNativeBuild for the two build types, and to use those for all the flavors?