Couple ideas
Investigate supporting @Contributes*Binding annotations on supertypes directly. Requires ensuring they're in metadata. Less sure about readability here
@Inject
class CacheImpl :
@ContributesBinding(AppScope::class)
Cache,
@ContributesBinding(AppScope::class)
AnotherType,
@ContributesBinding(AppScope::class)
YetAnotherType {
override fun toString(): String = "CacheImpl"
}
Make binding vararg, perhaps as an additionalBindings vararg to match the existing scope/additionalScopes patterns.
@Inject
@ContributesBinding(
AppScope::class,
binding<Cache>(),
binding<AnotherType>(),
binding<YetAnotherType>(),
)
class CacheImpl : Cache, AnotherType, YetAnotherType