Thread
#multiplatform
    brabo-hi

    brabo-hi

    6 months ago
    Hi all, in a KMM
    androidMain
    shared project, how can we get access to
    BuildConfig.APPLICATION_ID
    BuildConfig.VERSION_CODE
    BuildConfig.VERSION_NAME
    russhwolf

    russhwolf

    6 months ago
    This is no different than if you had a multimodule Android project without KMP. An Android module will generate a
    BuildConfig
    with whatever fields are present in the config for that module. If you need access to fields from a top-level app module from a lower-level library module you'll need to pass them in somewhere.
    xxfast

    xxfast

    6 months ago
    If you want build configs for your
    commonMain
    , you can try BuildKonfig
    wbertan

    wbertan

    6 months ago
    We use the
    BuildKonfig
    , I can say we didn't had any issues so far - we even set different values for the same key based on the platform and works fine.
    Our setup using
    BuildKonfig
    you can find here: https://medium.com/clearscore/drivescore-kmm-journey-episode-iii-issues-and-solutions-a83f58234b2#3b6b Where we described it (along with other KMM challenges we had and our solutions for it)