You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or if tracking another annotation via ContributesTo would be annoying, I would even be fine with @ContributesTo(AppScope::class, provides = true) or something similar.
This approach has downsides, e.g. you can replace or exclude contributed types, but you wouldn't be able to reference a contributed function. If you have multiple contributed functions, then you'd repeat the @ContributesTo annotation several times.
You can easily implement such a feature by yourself, though. kotlin-inject-anvil is extensible. Maybe consider adding your own annotation @ProvidesInto(AppScope::class) for top level functions and then you can can generate the needed interface.
I think it'd be pretty cool if you didn't need to wrap
@Provides
inside a@Component
.This doesn't work:
Today, you have to write something like this instead:
What if, instead, you could write this:
Or if tracking another annotation via
ContributesTo
would be annoying, I would even be fine with@ContributesTo(AppScope::class, provides = true)
or something similar.(also linking evant/kotlin-inject#389 (comment), since that was the basis for this)
The text was updated successfully, but these errors were encountered: