Ian Alexander
07/27/2022, 4:06 PMjvmMain
of shared code - with the idea being I want to write E2E tests which use the object graph in shared with Fakes attached. We currently have annotations on all constructors which are real annotations in JVM & Fakeannotations in iOS.
jvmMain
actual typealias MakeInjectable = javax.inject.Inject
commonMain
class LogInViewModel @MakeInjectable constructor() { ... }
The problem is, none of the generated dagger code is created - is there something simple I'm missing? Or is this even possible?
shared/build.gradle
plugins {
kotlin("multiplatform")
...
kotlin("kapt")
}
...
val jvmTest by getting {
dependencies {
...
implementation(AndroidLibrary.dagger)
compileOnly(AndroidLibrary.daggerCompiler)
}
}