That's not the same. I know I can do the switch Java side but it's a completely different thing.
If I use that to set API Keys etc. I don't want ALL OF THEM to be in the Java file. That will be compiled and packaged with the APK. I want to set it in the build file and have only 1 of the value in the APK. The one needed by that APK. On Friday, November 14, 2014 10:22:36 AM UTC+1, Avram Lyon wrote: > > The flavor names are already put in the BuildConfig by the Android plugin > itself, so you generally wouldn't need that. > > *Avram Lyon* > Android wrangler | Scopely, Inc. > > Refer The Smartest Person You Know And Pocket $7,000! > *Learn more: scopely.com/referrals > <http://www.scopely.com/referrals/?page=4>* > > On Fri, Nov 14, 2014 at 12:40 AM, Daniele Segato <[email protected] > <javascript:>> wrote: > >> I can't believe there's no interest in this function. >> >> >> On Wednesday, November 12, 2014 1:14:33 PM UTC+1, Daniele Segato wrote: >>> >>> Hi, >>> >>> I posted a feature request a while ago here: >>> https://code.google.com/p/android/issues/detail?id=73396 >>> >>> which describe what I'd like to have. >>> >>> Since it had no reply I'm now writing here to know if there is some way >>> to achieve a similar result. >>> >>> Is there a way to write something like this: >>> >>> buildConfigField "String", "MY_VAR_NAME", getMyVarValue( >>> getCurrentFlavor()); >>> >>> specifically I need the getCurrentFlavor() method so that my >>> function getMyVarValue can do all the switches needed. >>> >>> any way to achieve this? >>> >>> how do you handle that situation? >>> >>> >>> Thank you, >>> Daniele >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "adt-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
