Android buildTypes for Alpha/Beta/Production apk -
i want release apk on play store. release on alpha, beta , if goes release on production. can define different api endpoint each in buildtype inside gradle. if yes how? want change end point of api calling throughout application. if release apk on alpha api points http://test.alpha.bla.bla
for beta: http://test.beta.bla.bla
for production: http://test.production.bla.bla.
so in version of app (alpha/beta/production) having same version code without need upload new apk.
thanks.
i assume mean want 3 different build targets (and 3 different uploads google play): in build.gradle have android part, in there can define productflavors following:
productflavors{ alpha{ buildconfigfield 'string', 'server','http://test.alpha.bla.bla' } }
but make enums , refere (instead of type "string" have specifiy full package name + enum type , , in last part (the value), full package name + enum )
you can reference server using (in java)
buildconfig.server; //this http://test.alpha.bla.bla
Comments
Post a Comment