I'm trying to solve a similar problem to NDK support with different Product Flavour but in a .c file instead of a .cpp file.
Does anyone know how of if it's possible to get the current build flavor from the JNIEnv
parameter in C like in the accepted C++ solution in the linked thread? And if not what is the most efficient way to have a function in C return a different string on each flavor.
My first instinct was to declare a different jni folder in each flavor in gradle by giving each an ExternalNativeBuild NDKBuild
path, but it fails to build as gradle attempts to find a method path()
in Android.mk opposed to setting the jni folder for the flavor.