s

    Sam

    1 month ago
    Has anyone managed to get a concept of build variants working within the shared code? Specifically my usecase is wanting to define instances of data classes populated with dummy data (for a mock variant of the app) in shared code, but I don't want those to be used in production. Any ideas anyone? 🙏
    deviant

    deviant

    1 month ago
    maybe this could cover your use casehttps://github.com/yshrsmz/BuildKonfig
    s

    Sam

    1 month ago
    Not really to be honest, unless I'm missunderstanding. I think that solves the problem of wanting configuration in one place , but doesn't solve the problem of wanting multiple source sets within the shared code
    l

    leandro

    1 month ago
    I don’t have a good solution other than providing the data from the leaf/app module. This way every other module isn’t aware of variants
    xxfast

    xxfast

    1 month ago
    I created a you track issue to address lack of debug variants in common code, but that got immediately shot down
    s

    Sam

    1 month ago
    @xxfast Do you have a link to the issue? I'd be interested in the response
    I am moving this to 'Declined', not because the proposal is bad, but because we will not implement something like this in "the current multiplatform".
    We're working together with Google to provide a better mpp+Android integration in the future. This implementation will have source sets completely re-designed and will hopefully satisfy your needs fully!
    @Sebastian Sellmair [JB]
    my current workaround for this is to extract this to a standalone nested module and include that for android debug variant like
    debugImplementation(project(":app:debug"))
    Sebastian Sellmair [JB]

    Sebastian Sellmair [JB]

    1 month ago
    Just to get a better understanding, why is the.
    androidDebug
    source set not an option for your use case?
    s

    Sam

    1 month ago
    Because the
    androidDebug
    source set cannot be accessed from iOS. @xxfast how do you use that module in your iOS / other platforms?
    xxfast

    xxfast

    1 month ago
    that i'm yet to figure out 😅
    right now im consuming the debug library in my release build as well - which is generally no go
    s

    Sam

    1 month ago
    Ah fair enough, my current thinking is trying to do some kind of clever symlinking but it's probably asking for trouble