Hi I am learning KMM and got confused how to set o...
# multiplatform
m
Hi I am learning KMM and got confused how to set our base url in our shared module according to the build variants(development, production etc). I can't access
BuildConfig
which we have in out android projects.
j
m
isn't there any other way then implementing this ? I can create different configs in shared module same as in android but can't I access them ?
g
You can’t access them from your android module as since the android module will depend on them. Also, they are android specific meaning you can’t shared them across the other platforms.
I suggest you move the configuration from the android module to the shared module(s) instead.
m
I have different configs in shared module but how can I know in config is in current use in shared module ?
g
What do you mean? You have different configs for different flavours?
m
I have different flavors for my shared module now I wanna set my app baseURL according to the flavors how can i do that ?
g
The readme for BuildKonfig covers that
m
yap read that so isn't there any other way to do this ?