ursus
01/24/2025, 2:01 AMkotlin inject users? How is it in production?jw
01/24/2025, 2:03 AMursus
01/24/2025, 2:04 AMjw
01/24/2025, 2:09 AMursus
01/24/2025, 2:11 AMWe still use are using Dagger 2 within the native host appHow come? Do you mean a single class having two
@Inject annotations?jw
01/24/2025, 2:13 AMursus
01/24/2025, 2:14 AMjw
01/24/2025, 2:16 AMjw
01/24/2025, 2:18 AMHttpClient service interface which has Request and Response values as its function argument and return type. In the guest (JS) we'll bind the implementation of the HttpClient that calls out to the host into the kotlin-inject graph, and on the host (Android) the implementation of HttpClient will be in the graph and @Binds to HttpClient to be bound to the JS VM.jw
01/24/2025, 2:19 AMursus
01/24/2025, 2:21 AMcommonMain?jw
01/24/2025, 2:21 AMjw
01/24/2025, 2:22 AMursus
01/24/2025, 2:25 AMjsMain?jw
01/24/2025, 2:25 AMursus
01/24/2025, 2:26 AM@Provides it to the other. Which would mean accessing the Components somehow statically in the @Provides function, but I guess would work (?)ursus
01/24/2025, 2:30 AMjw
01/24/2025, 2:37 AMjw
01/24/2025, 2:38 AMjw
01/24/2025, 2:38 AMursus
01/24/2025, 2:39 AMjw
01/24/2025, 2:41 AMjw
01/24/2025, 2:41 AMjw
01/24/2025, 2:41 AMursus
01/24/2025, 2:43 AM@Module
class DaggerModule {
@Provides fun provideFoo(kiAppComponent): Foo {
return kiAppComponent.foo
}
}jw
01/24/2025, 2:43 AMjw
01/24/2025, 2:44 AMursus
01/24/2025, 2:44 AMjw
01/24/2025, 2:44 AMinterface Foo {
getA(): A
getB(): B
}
it can put A and B into the graph solely from a Fooursus
01/24/2025, 2:46 AMAppComponent look like? modules = [ .. ] or 2000 module references?
One of my main arguments against chosing koin over `kotlin-inject`was the necessity to plug a given gradle module's DI module manuallyjw
01/24/2025, 2:48 AMjw
01/24/2025, 2:49 AMjw
01/24/2025, 2:49 AMjw
01/24/2025, 2:50 AMursus
01/24/2025, 2:51 AMursus
01/24/2025, 2:57 AMjw
01/24/2025, 3:11 AMursus
01/24/2025, 3:13 AMjw
01/24/2025, 4:39 AM