https://kotlinlang.org logo
Title
e

evant

06/14/2021, 4:37 PM
my understanding for anvil would be from
interface AppComponent

@ContributesTo(AppComponent::class)
abstract class MyComponent1

@ContributsTo(AppComponent::class)
abstract class MyComponent2
generate
@Component
abstract AppComponentImpl : AppComponent, MyComponent1, MyComponent2
which... I'm not sure is worth it? Maybe I'm missing use-cases here.
j

Javier

06/14/2021, 7:55 PM
Yeah, I am talking about that
But not same indeed
Something similar to that, the idea is only annotating the implementation, so
interface AppComponent

interface Repo {
    ...
}

@BoundTo(AppComponent::class)
class RepoImpl(...) {
    ...
}
Personally I would like to see more about pure Compose app too (component samples, sharing viewmodels between screen composables (androidx viewmodels or just custom non android viewmodels)
e

evant

06/14/2021, 8:15 PM
yeah am working on a compose sample.
what you posted seems very similar to what @dave08 proposed https://github.com/evant/kotlin-inject/discussions/135