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

saket

09/01/2019, 7:17 PM
@leandro I'm curious: are you building your dagger graph on Android for shared classes?
l

leandro

09/01/2019, 8:11 PM
yep, it’s not ideal but for now it works. I’m creating up to the presenter in my common module
s

saket

09/01/2019, 8:12 PM
Very interesting. I might take this approach too. Any downsides of this?
l

leandro

09/01/2019, 8:15 PM
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
s

saket

09/02/2019, 2:53 AM
I was able to add a compiler flag this way:
Copy code
// 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

09/02/2019, 8:28 AM
Yep that’s what I meant by not ideal. Right now my presenters are constructed by dagger (i have all of them with
@Inject
)
4 Views