Closed edenman closed 9 months ago
We have a multiplatform sample here, am also going to look into the new processing scheme in ksp2 which should make this simpler
Yeah, I'm assuming it's something to do with me using the Compose Multiplatform sample app as a base. It has a different structure than your sample. In particular, the generated InjectAppComponent
ends up here:
composeApp/build/generated/ksp/android/androidDebug/kotlin/di/InjectAppComponent.kt
. Sort of makes sense that it wouldn't be accessible from composeApp/src/commonMain/
....maybe I'm just using it wrong? Is the idea that you only ever access the generated code from the iOS/Android/whatever code?
Yeah the way that ksp currently works is it generates per-platform. ksp2 has an experimental option to generate per sourceset instead.
Thanks, makes sense. I was assuming I'd want to create the graph in the common code. You can probably close this? Up to you.
Yeah, opened https://github.com/evant/kotlin-inject-samples/issues/17 for the investigation
I'm using generateCompanionExtensions. My components are defined in
composeApp/src/commonMain/kotlin/Foo.kt
and i can see the generated code and it looks correct, but I'm not able to import thecreate
method (if I try to add this dep it creates a circular dep). Feels like something very easy but I can't figure it out. Repro project: https://github.com/edenman/atlas-client