Thread
#multiplatform
    saket

    saket

    3 years ago
    @leandro I'm curious: are you building your dagger graph on Android for shared classes?
    l

    leandro

    3 years ago
    yep, it’s not ideal but for now it works. I’m creating up to the presenter in my common module
    saket

    saket

    3 years ago
    Very interesting. I might take this approach too. Any downsides of this?
    l

    leandro

    3 years ago
    Not that I couldn’t work around. One annoying outcome was having to declare
    @OptionalExpectation
    (since
    @Inject
    is not needed on different targets) on several classes as a consequence. Maybe I can pass as a compiler flag, but couldnt make it work yet
    saket

    saket

    3 years ago
    I was able to add a compiler flag this way:
    // Inside kotlin {}
    all {
      languageSettings {
        useExperimentalAnnotation('kotlin.Experimental')
      }
    }
    Hrm I'm unable to make my dagger graph compile. What does your dagger setup look like? Are you using constructor injection in your presenter? Or are you manually constructing its object?
    l

    leandro

    3 years ago
    Yep that’s what I meant by not ideal. Right now my presenters are constructed by dagger (i have all of them with
    @Inject
    )