https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

Md Hanif

12/24/2020, 3:38 PM
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

jdamcd

12/24/2020, 3:55 PM
m

Md Hanif

12/24/2020, 4:02 PM
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

Giorgos Neokleous

12/24/2020, 4:09 PM
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

Md Hanif

12/24/2020, 4:14 PM
I have different configs in shared module but how can I know in config is in current use in shared module ?
g

Giorgos Neokleous

12/24/2020, 4:36 PM
What do you mean? You have different configs for different flavours?
m

Md Hanif

12/24/2020, 4:45 PM
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

Giorgos Neokleous

12/24/2020, 5:01 PM
The readme for BuildKonfig covers that
m

Md Hanif

12/24/2020, 5:09 PM
yap read that so isn't there any other way to do this ?
3 Views