I build the same Android code from both Android Studio and Visual Studio, and I need a #define in the Java code to compile a line of code differently depending on which environment is doing the build. How can I do this when Java has no #defines?
It would appear that the optimal way to do this would be to define a variable in Gradle based on the build environment, and have the Java code use that variable at compile time to switch which line of code gets built. Unfortunately I've not been able to figure out how to do that.
I'd need a functionality similar to the following pseudo code
#ifdef $(VisualStudio)
LoadLibrary("libVS.so");
#elif $(AndroidStudio)
LoadLibrary("libAS.so");
#endif
Is this actually possible? Are there other/better ways to achieve my goal?